facile-it/php-jose-verifier
A lightweight PHP library for validating JWT tokens from OpenID and OAuth2 providers. It builds verifiers and decrypters automatically from issuer and client metadata, fetching public keys from a jwks_uri endpoint, with optional GMP support for better performance.
at_hash/c_hash/auth_time/s_hash checks) or on product. This package says: don't spend it on the primitives.ext-gmp recommendation and JWKS caching guidance feed directly into a deployment-image standard and a "no per-request JWKS fetch" non-functional requirement — PM-visible inputs to an SLO discussion.Consider it when all of the following hold:
openid-configuration / jwks_uri. The package is explicitly built around that discovery surface.Cache and Http facades are not what this package speaks.web-token/jwt-library subtree in Composer audits, be prepared to vendor/fork).web-token/* replacement, dropped JWE compression). Treat upgrades as change-managed work, not composer update.Look elsewhere when:
php artisan scaffolding, out-of-the-box guards, and Laravel-native caching/HTTP — the wrapper work is on us; alternatively evaluate a Laravel-native package if one covers the same ground.tymon/jwt-auth territory.To executives (one paragraph): This is a small, focused PHP library that lets our Laravel application trust identity tokens issued by an external login provider — Auth0, Okta, Keycloak, Entra ID, Cognito. It handles the security-critical mechanics (signature verification, encryption, key rotation, claim checks) that we would otherwise build and maintain ourselves. That lets us sell and deliver "federated login" and "bring-your-own identity provider" capabilities without a bespoke integration per customer. The trade-off is that adopting it means owning a thin integration layer and a small dependency-risk budget — it is not a polished, widely-adopted library, so we should plan for version pinning and the possibility of vendoring it. It is the right choice if our strategy is to delegate identity to customer IdPs; it is the wrong choice if we need to issue our own tokens or require instant token revocation.
To engineering:
issuer, jwks_uri) and client metadata (client_id, client_secret, response algs), container bindings for the three verifiers (AccessToken, IdToken, UserInfo) as per-issuer singletons, and a guard/middleware. Estimate 1–2 days for production quality.Psr\SimpleCache\CacheInterface, which Laravel's Cache facade does not implement — we need a PSR-16 adapter over the Laravel store or we refetch the remote JWKS on every request. (2) Remote JWKS fetching goes through PSR-18, not Laravel's Http facade, so we either bind a PSR-18 client or write an adapter and lose Laravel's HTTP middleware (retries, logging, telemetry) unless we wrap it.web-token/jwt-library, so audit that subtree, not just this package; add ext-gmp to the deployment image or RSA verification falls back to a slower path; and capability gaps are real — no revocation/introspection/opaque-token handling, so any requirement for immediate invalidation must be met with short token lifetimes or a separate layer.How can I help you explore Laravel packages today?