gree/jose
gree/jose is a PHP JOSE library for securely signing and encrypting data with JWS and JWE. It supports JWK key management and JWT workflows, making it useful for token-based authentication and interoperable JSON security in PHP applications.
gree/jose is a pure PHP JOSE implementation for JWT, JWS, JWE, JWK, JWK Set, and JWK Thumbprint. It can fit Laravel as an application-layer dependency behind services, middleware, custom auth guards, webhook verifiers, or outbound request signers. It is not Laravel-native: expect no facade, service provider, config publishing, or Laravel-specific documentation. Fit is strongest only if the product specifically needs JWE and JWK Set/thumbprint functionality; for basic JWT verification it is likely over-scoped relative to maintained alternatives.NOASSERTION. A TPM should treat adoption as a fork-or-contain decision, not a normal dependency decision.alg/kid handling, JWK Set caching/key-rotation defects, JWE decompression or parsing edge cases, PHP 8.x compatibility gaps, and no upstream security patch path. NOASSERTION creates legal/release uncertainty until counsel confirms terms. The 139 stars indicate some historical usage but do not establish active maintenance or security assurance.none, validate iss/aud/exp/nbf with leeway, and handle kid rotation safely? Are JWKS fetched and cached safely? Are there known CVEs or unpatched issues? Will we fork and own maintenance, or replace it? What is the threat model for token issuers, key custody, and rotation?gree/jose behind internal interfaces such as JwtVerifier, JweDecryptor, and JwkSetResolver. Bind implementations through a Laravel service provider. Keep library classes out of controllers, models, and jobs. Put algorithm allowlists, issuer/audience, clock skew, and key sources in config/*.php and environment-specific secrets.lcobucci/jwt, firebase/php-jwt, web-token/jwt-framework, or a managed identity provider depending on JWE/JWK needs. If forced to retain it, pin a commit, vendor or fork under the organization, and document ownership.openssl, json, mbstring, and potentially sodium/zlib for JWE paths), and Composer dependency conflicts. Confirm support for the exact algorithms used by identity providers. Test token parsing, claim validation, JWKS caching, key rotation, and error behavior under PHPUnit/Pest, static analysis, and dependency audit. Do not assume Laravel’s default auth stack covers JOSE semantics.NOASSERTION adds legal review overhead for distribution, modification, and contributor workflows.kid during rotation, malformed JWKS, algorithm mismatch, unsupported algorithms, signature or decryption failures, missing PHP extensions, cache outages causing JWKS fetch storms, and deployment breakage after PHP upgrades. Mitigate with strict algorithm allowlists, bounded clock leeway, stale-while-revalidate JWKS caching, timeouts and circuit breakers, and explicit “fail closed” auth behavior. Monitor verification failures by reason, latency, JWKS fetch errors, and cache hit rate.How can I help you explore Laravel packages today?