NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #159 most downloaded on Packagist
A simple library to work with JSON Web Token and JSON Web Signature
Latest stable
5.7.0
Last release 3 days ago
19 Nov 2026
Release timing varies
gaps range from 2 weeks to 12 months
Nearly every release is documented
notes for 55 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
65 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
This release adds PHP 8.6 support and deprecates LooseValidAt , requiring users to at least define an expiration date for their tokens.
This release adds PHP 8.6 support and deprecates LooseValidAt, requiring users to at least define an expiration date for their tokens.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
This release prevents unexpected exceptions from being raised when an invalid ECDSA signature is provided.
This release prevents unexpected exceptions from being raised when an invalid ECDSA signature is provided.
Total pull requests resolved: 2
5.6.x bugfix release (patch)
Total pull requests resolved: 1
Feature release (minor)
Total pull requests resolved: 5
Feature release (minor)
.readthedocs.yaml and /renovate.json files from dist thanks to @Slamdunkreadonly classes thanks to @SlamdunkTotal pull requests resolved: 1
5.4.x bugfix release (patch)
Total pull requests resolved: 1
5.4.x bugfix release (patch)
This release fixes doc blocks to make sure static analysis tools can identify usage issues.
This release fixes doc blocks to make sure static analysis tools can identify usage issues.
This release adds PHP 8.4 compatibility and improvements on the codebase.
This release adds PHP 8.4 compatibility and improvements on the codebase.
This release ships a new validation constraint to assert that a private claim exists.
This release ships a new validation constraint to assert that a private claim exists.
This release provides an API to ease key rotation procedures and dependency updates.
This release provides an API to ease key rotation procedures and dependency updates.
This releases compatibility guarantees with PHP 8.3 and adds testing against PHP 8.4-dev.
This releases compatibility guarantees with PHP 8.3 and adds testing against PHP 8.4-dev.
1025: Update all non-major dependencies thanks to @renovate[bot]
1017: Update dependency phpstan/phpstan to v1.10.26 thanks to @renovate[bot]
1016: Update dependency lcobucci/coding-standard to v11 thanks to @renovate[bot]
1006: Lock file maintenance thanks to @renovate[bot]
1004: Update all non-major dependencies thanks to @renovate[bot]
1010: Fixed naming of assertShouldRaiseExceptionWhenSignatureIsValid() thanks to @rhertogh
This release removes deprecated components, makes PHP 8.1 the minimum required version, and ships some API improvements.
This release removes deprecated components, makes PHP 8.1 the minimum required version, and ships some API improvements.
strings thanks to @Slamdunk\Lcobucci\JWT\Signer\None thanks to @Slamdunk968: Deprecate Ecdsa create thanks to @lcobucci
Feature release (minor)
lcobucci/clock:^3.0 to be installed with lcobucci/jwt:^4 thanks to @OcramiusThis release fixes a documentation mistake.
This release fixes a documentation mistake.
To contain the impact of the changes and give time for people to rotate keys, we have deprecated implementations that maintain the previous behaviour…
This release provides a high-level API, a new (non-standard) algorithm, and validation for key length requirements. The latter is a minor BC-break for users that aren't following the RFC recommendations.
To contain the impact of the changes and give time for people to rotate keys, we have deprecated implementations that maintain the previous behaviour and allow unsafe keys. For more information, please read the documentation.
::empty() factory method thanks to @Slamdunk789: Merge release 4.1.5 into 4.2.x thanks to @github-actions[bot]
704: Invalid signing with SHA256 alg using secp521r1 curve thanks to @KartaviK
This patch ships a minor security fix to prevent misuse of the LocalFileReference key.
This patch ships a minor security fix to prevent misuse of the LocalFileReference key.
More info: https://github.com/lcobucci/jwt/security/advisories/GHSA-7322-jrq4-x5hf
This release removes the possibility of having parsing issues when dealing with time-fractions with more than 6 decimal places.
This release removes the possibility of having parsing issues when dealing with time-fractions with more than 6 decimal places.
This release fixes a specification compatibility issue by making sure we use floats to represent time fractions.
This release fixes a specification compatibility issue by making sure we use floats to represent time fractions.
This release fixes the polyfill for sodium base64 encoding.
This release fixes the polyfill for sodium base64 encoding.
This release makes it possible to use the library when libsodium < 1.0.14 is installed.
This release makes it possible to use the library when libsodium < 1.0.14 is installed.
555: Add StrictValidAt constraint, deprecate ValidAt to LooseValidAt thanks to @Slamdunk
This release provides a new algorithm (EdDSA over Curve25519) and a claim formatted that always uses integers for date claims.
This patch ships a minor security fix to prevent misuse of the LocalFileReference key.
This patch ships a minor security fix to prevent misuse of the LocalFileReference key.
More info: More info: https://github.com/lcobucci/jwt/security/advisories/GHSA-7322-jrq4-x5hf
This release removes the possibility of having parsing issues when dealing with time-fractions with more than 6 decimal places.
This release removes the possibility of having parsing issues when dealing with time-fractions with more than 6 decimal places.
json_encode() to convert time fractions to microseconds cause precision issues thanks to @sachchida1993This release fixes a specification compatibility issue by making sure we use floats to represent time fractions.
This release fixes a specification compatibility issue by making sure we use floats to represent time fractions.
This release fixes the validation logic of the expiration claim, making sure we're properly following the RFC.
This release fixes the validation logic of the expiration claim, making sure we're properly following the RFC.
281: Fix deprecation notices thanks to @lcobucci
This release ships several API improvements, making this lib much more extensible and easier to use. It requires PHP 7.4 and it's compatible with PHP 8.0 as well (the latest RC).
Please follow our upgrading guide to perform the necessary adjustments to your code.
ValidAt constraint thanks to @lcobucci404: Bump symfony/deprecation-contracts from 2.1.3 to 2.2.0 thanks to @dependabot-preview[bot]
This release provides a stable interface for our new major release (v4.0).
We now have a library ready for PHP 8.0, fully documented, and able to be more easily extended.
Please check our upgrading guide, test your code, and report any issue.
Attention: There are a few BC-breaks (when comparing to the previous alpha releases), so please check the change set (especially PRs 538 and 533).
Total pull requests resolved: 1
281: Fix deprecation notices thanks to @lcobucci
Total pull requests resolved: 25
ValidAt constraint thanks to @lcobucciThis patch ships a minor security fix to prevent misuse of the LocalFileReference key.
This patch ships a minor security fix to prevent misuse of the LocalFileReference key.
More info: More info: https://github.com/lcobucci/jwt/security/advisories/GHSA-7322-jrq4-x5hf
This release fixes an issue with the compatibility layer that disallowed us to use composer's classmap-authoritative autoload.
This release fixes an issue with the compatibility layer that disallowed us to use composer's classmap-authoritative autoload.
630: Improve deprecation for aud claims thanks to @SvenRtbg
This release fixes a gap on our forward compatibility layer with v4 for multiple audience support, improving the documentation to state how users can migrate their code.
Total pull requests resolved: 2
@param annotation of OpenSSL#doVerify() thanks to @chalasrTotal pull requests resolved: 1
561: Remove RegisteredClaimGiven exception in favour of deprecation message for withClaim thanks to @Spomky
This release fixes a bug and a BC-break introduced in v3.4.0.
⚠ This version also triggers E_USER_DEPRECATED errors in scenarios where we can't simply use @deprecated. Please make sure you follow the provided ins…
This release introduces a forward compatibility layer for the next major release (v4.0.0), guiding users to make their code compatible with both versions.
⚠ This version also triggers E_USER_DEPRECATED errors in scenarios where we can't simply use @deprecated. Please make sure you follow the provided instructions before upgrading your production code.
getPassphrase PHPDoc thanks to @SpomkyTotal pull requests resolved: 1
Claim::getValue can return anything thanks to @carusogabrielTotal pull requests resolved: 1
295: Fix deprecation notes thanks to @lcobucci
This version fixes the inconsistencies with the upcoming major release.
…with PHP 7.1+ too. We're also starting to add deprecation notes and will soon backport things from v4.x to create an upgrade path.
This version provides a major performance improvement for the ECDSA algorithm, making it compatible with PHP 7.1+ too. We're also starting to add deprecation notes and will soon backport things from v4.x to create an upgrade path.
README.md thanks to @msimionTotal pull requests resolved: 1
This release fixes a compatibility issue introduced in v3.2.3.
This release fixes a compatibility issue introduced in v3.2.3.
Total pull requests resolved: 3
This version fixes some small documentation issues.
This version fixes some small documentation issues.
Total issues resolved: 2
Builder#sign() docblock to allow Key|string on $key thanks to @msvrtanexp instead of nbf) thanks to @carlnordenfeltEnhancement: - #116 - Use DateTimeInteface on Token#isExpired(); Fixes: - #132 - Raise exception on RSA sign failure
Enhancement:
DateTimeInteface on Token#isExpired();Fixes:
Improvement: - #102 - Make ECDSA signer compatible with keys generated by openssl; - #108 - Add a way to know if the token is expired or not. Fixes: -
Improvement:
openssl;Fixes:
openssl errors properly while validating the keys.Temporary solution of #106 (to at least make it work on the stable version).
Fixes:
Fixes: - Typo fix in exception message
Fixes:
Adding methods to check if a header/claim exists
Features:
getHeader() and getClaim() (#54)Using the correct typ header when token is signer (was being changed to "JWS")
Fixes:
Using the proper curves for ECDSA signer (fixes #30)
Fixes:
Adding type cast to ValidationData (fixes #28)
Fixes
Delegate the payload generation to Builder and Parser
Fixes:
Removing possible warning in HMAC signer caused by invalid argument
Fixes:
For security reasons we recommend that users upgrade to this last version.
For security reasons we recommend that users upgrade to this last version.
Fixes:
alg header to retrieve the signature algorithm (#21)Improvements:
The major thing of this version is that you should now specify the signer in order to verify a token, so one would not be able to forge tokens with different algorithms than the expected one.
Removing possible warning in HMAC signer caused by invalid argument
Fixes:
Nothing published for this version
New features: - RSA signers - ECDSA signers - Token::getClaim() method Improved readme
New features:
Improved readme
One column per quarter.