Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Jose Verifier Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy on OIDC verification. If a roadmap item calls for "accept tokens from Auth0/Okta/Keycloak/Entra ID/Cognito," this package replaces weeks of hand-rolled JOSE parsing, signature verification, JWKS fetching, and clock/claim validation with a thin integration. The PM-level decision it informs is whether we spend engineering on the trust boundaries (issuer, audience, at_hash/c_hash/auth_time/s_hash checks) or on product. This package says: don't spend it on the primitives.
  • Resource-server / relying-party architecture. It supports the decision to delegate identity to an external IdP rather than issuing tokens ourselves. That's a meaningful product/security decision — it lets a customer's or partner's identity provider be the source of truth, which matters for B2B/SSO features, enterprise deal requirements, and "bring your own IdP" positioning.
  • Multi-IdP support. Because verifiers are built from per-issuer metadata, "support multiple identity providers per tenant/environment" becomes a configuration story, not a re-architecture. This should factor into roadmap sequencing — you can promise federated login to a customer without a bespoke integration per IdP.
  • Encrypted-token and UserInfo flows. The package covers signed and encrypted tokens plus a UserInfo verifier. That supports decisions about how strict our OIDC conformance can be in sales material ("we support encrypted ID tokens / signed UserInfo responses"), which is often an enterprise-procurement checkbox.
  • Performance posture. The 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.
  • Where it does not help — and the decisions that follow. No token revocation, no introspection, no opaque-token handling. If a roadmap item needs instant invalidation or opaque access tokens, this package is not the answer and the decision should be "short token lifetimes" or "add an introspection layer," not "make this package do it."

When to Consider This Package

Consider it when all of the following hold:

  • We are the relying party / resource server — we consume JWTs minted elsewhere and need to validate them. If we are issuing tokens, this is the wrong tool (that's Passport or an external IdP).
  • The issuer is a standards-compliant OIDC/OAuth2 provider exposing openid-configuration / jwks_uri. The package is explicitly built around that discovery surface.
  • We need to verify ID tokens, access tokens, or signed/encrypted UserInfo responses, including encrypted (JWE) tokens and symmetric-key cases using a client secret.
  • We accept the integration tax: no Laravel service provider, facade, or config ships with it. We will write a wrapper (config schema, container bindings, guard/middleware) — realistically 1–2 days for production quality, plus a PSR-16 cache adapter over Laravel's cache store and a PSR-18/HTTP-client decision, because Laravel's Cache and Http facades are not what this package speaks.
  • We accept supply-chain and stewardship risk: 5 stars, 0 dependents, effectively single-vendor maintenance (Facile.it). That is tolerable for a narrow, verifiable crypto-adjacent utility, but it must be a conscious, budgeted decision (pin versions, watch the web-token/jwt-library subtree in Composer audits, be prepared to vendor/fork).
  • We can pin exactly. 0.x history shows minor bumps were breaking in practice (namespace moves, web-token/* replacement, dropped JWE compression). Treat upgrades as change-managed work, not composer update.

Look elsewhere when:

  • We need token revocation, introspection, or opaque-token support — out of scope, and won't be solved by configuration.
  • We want a turnkey Laravel experience with 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.
  • We need self-issued tokens — Passport or tymon/jwt-auth territory.
  • We cannot accept a pre-1.0, single-maintainer dependency inside the auth path — this is the highest-risk area and, for some orgs, a legitimate blocker.

How to Pitch It (Stakeholders)

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:

  • It's framework-agnostic by design — no Laravel glue ships with it. The deliverable is a thin application wrapper: a config schema mapping issuer metadata (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.
  • Two integration frictions to plan for, not discover: (1) JWKS caching requires a 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.
  • Design is friendly to us: immutable builders and verifiers are a genuine plus under Octane/Swoole where mutable shared state is a hazard, and the builder pattern maps cleanly onto Laravel config.
  • Risks to track: adoption risk (5 stars, 0 dependents, single-vendor stewardship — budget a fork/vendor contingency); pre-1.0 semver (pin exact, change-manage upgrades); transitive crypto surface is 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.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style