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(2mo ago)045MITPHPPHP ^8.1

Since Feb 26Pushed 2mo 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 1mo ago

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

40

—

FairBetter than 88% of packages

Maintenance86

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

74d 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

[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[fschmtt/keycloak-rest-api-client-php

PHP client to interact with Keycloak's Admin REST API.

4684.7k2](/packages/fschmtt-keycloak-rest-api-client-php)

PHPackages © 2026

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