A simple library to encode and decode JSON Web Tokens (JWT) in PHP, conforming to RFC 7519. Use composer to manage your dependencies and download PHP-JWT. Optionally, install the paragonie/sodium_compat package from composer if your php is < 7.2 or does not have libsodium installed. If your private key contains \n characters, be sure to wrap it in double quotes "" and not single quotes '' in order to properly interpret the escaped characters. You must specify supported algorithms for your application. You can add a leeway to account for when there is a clock skew times between the signing and verifying servers. It is recommended that this leeway should not be bigger than a few minutes.

Features

  • Support RS384 and RS512
  • Detect invalid Base64 encoding in signature
  • Support for late static binding
  • Require a non-empty key to decode and verify a JWT
  • Run the tests using phpunit

Project Samples

Project Activity

See All Activity >

Categories

Package Managers

License

BSD License

Follow PHP-JWT

PHP-JWT Web Site

Other Useful Business Software
Go From AI Idea to AI App Fast Icon
Go From AI Idea to AI App Fast

One platform to build, fine-tune, and deploy ML models. No MLOps team required.

Access Gemini 3 and 200+ models. Build chatbots, agents, or custom models with built-in monitoring and scaling.
Try Free
Rate This Project
Login To Rate This Project

User Ratings

★★★★★
★★★★
★★★
★★
1
0
0
0
0
ease 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 4 / 5
features 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 4 / 5
design 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 3 / 5
support 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 4 / 5

User Reviews

  • good
Read more reviews >

Additional Project Details

Programming Language

PHP

Related Categories

PHP Package Managers

Registered

2021-07-27