PHPackages                             z-trippete/jwt-verifier - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. z-trippete/jwt-verifier

ActiveLibrary

z-trippete/jwt-verifier
=======================

Library for jwt token verifier

2.1.2(3w ago)045MITPHPPHP ^8.1

Since Feb 26Pushed 3w agoCompare

[ Source](https://github.com/z-trippete/jwt-verifier)[ Packagist](https://packagist.org/packages/z-trippete/jwt-verifier)[ RSS](/packages/z-trippete-jwt-verifier/feed)WikiDiscussions develop Synced today

READMEChangelogDependencies (2)Versions (10)Used By (0)

JWT Verifier for php
====================

[](#jwt-verifier-for-php)

A simple and lightweight php class to verify JWT tokens using JWKS (JSON Web Key Sets). Perfect for integrating with identity providers.

Features
--------

[](#features)

- **JWKS Support**: Automatically fetches public keys from a remote URL.
- **Smart Caching**: Includes a flexible `CacheManager` to store JWKS data, reducing latency and avoiding rate-limiting from your Identity Provider.
- **Claim Validation**: Verifies `iss` (Issuer), `aud` (Audience), and `exp` (Expiration).
- **Clear Exception Handling**
    Provides dedicated exceptions for every failure scenario:
    - `TokenFormatException` – Thrown when the JWT structure is invalid or malformed.
    - `TokenValidationException` – Thrown when signature, issuer, or audience validation fails.
    - `TokenExpireException` – Thrown when the token is expired (`exp` claim).
    - `OAuthProviderException` – Thrown when the JWKS endpoint cannot be reached or the HTTP request fails.
    - `JwksFormatException` – Thrown when the JWKS response is malformed, missing keys, or the requested `kid` is not found.

Requirements
------------

[](#requirements)

- PHP 8.1 or higher

Dependencies
------------

[](#dependencies)

This package leverages the most reliable libraries in the PHP ecosystem:

- **[lcobucci/jwt](https://github.com/lcobucci/jwt)**: For high-security JWT parsing and validation (v4.3+).
- **[guzzlehttp/guzzle](https://github.com/guzzle/guzzle)**: For robust asynchronous HTTP requests to fetch JWKS keys.

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require z-trippete/jwt-verifier
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance95

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

8

Last Release

22d ago

Major Versions

1.0.2 → 2.0.02026-02-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/012fd0ce76a81abbe50e24005432b95717b0c44a7d8ee71cc35503f0bda16d98?d=identicon)[ZTrippete](/maintainers/ZTrippete)

---

Top Contributors

[![giuserai99](https://avatars.githubusercontent.com/u/50454946?v=4)](https://github.com/giuserai99 "giuserai99 (13 commits)")[![maseba](https://avatars.githubusercontent.com/u/64329290?v=4)](https://github.com/maseba "maseba (1 commits)")

### Embed Badge

![Health badge](/badges/z-trippete-jwt-verifier/health.svg)

```
[![Health](https://phpackages.com/badges/z-trippete-jwt-verifier/health.svg)](https://phpackages.com/packages/z-trippete-jwt-verifier)
```

###  Alternatives

[imdhemy/appstore-iap

PHP Appstore In-App Purchase implementation

551.4M4](/packages/imdhemy-appstore-iap)[oat-sa/lib-lti1p3-core

OAT LTI 1.3 Core Library

35327.1k9](/packages/oat-sa-lib-lti1p3-core)[mvdnbrk/dhlparcel-php-api

DHL Parcel API client for PHP

3957.6k4](/packages/mvdnbrk-dhlparcel-php-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
