https://github.com/fusionauth/fusionauth-example-php-jwt
PHP JWT example code
https://github.com/fusionauth/fusionauth-example-php-jwt
fusionauth jwt php
Last synced: about 1 year ago
JSON representation
PHP JWT example code
- Host: GitHub
- URL: https://github.com/fusionauth/fusionauth-example-php-jwt
- Owner: FusionAuth
- License: apache-2.0
- Created: 2021-01-06T21:04:04.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-28T05:55:30.000Z (almost 2 years ago)
- Last Synced: 2025-04-05T17:38:06.872Z (about 1 year ago)
- Topics: fusionauth, jwt, php
- Language: PHP
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# 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](https://getcomposer.org/doc/00-intro.md).
`composer install`
`php `
## Environment
Tested on php 8.2.8.
JWTs originally built by [FusionAuth](http://fusionauth.io).