Skip to content

FusionAuth/fusionauth-example-php-jwt

Repository files navigation

PHP JWT Examples

This code uses the PHP Firebase JWT library: https://github.com/firebase/php-jwt and runs through a couple of different scenarios.

  • building a JWT with the 'hmac' algorithm
  • building a JWT with the 'rsa' algorithm
  • building a JWT with the 'hmac' algorithm but verifying additional claims
  • decoding an invalid JWT with the 'hmac' algorithm

To install

This assumes you have composer installed. If not, get it here.

composer install

php <file>

Environment

Tested on php 8.2.8.

JWTs originally built by FusionAuth.

About

PHP JWT example code

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages