https://github.com/fusionauth/fusionauth-example-java-jwt
Java JWT usage
https://github.com/fusionauth/fusionauth-example-java-jwt
Last synced: 6 months ago
JSON representation
Java JWT usage
- Host: GitHub
- URL: https://github.com/fusionauth/fusionauth-example-java-jwt
- Owner: FusionAuth
- License: apache-2.0
- Created: 2021-01-06T22:10:03.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-28T05:55:05.000Z (almost 2 years ago)
- Last Synced: 2025-03-25T06:33:22.521Z (over 1 year ago)
- Language: Java
- Size: 12.7 KB
- Stars: 2
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Java JWT Examples
This code uses the FusionAuth JWT library: https://github.com/FusionAuth/fusionauth-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
You'll need maven.
`mvn compile`
`mvn exec:java -Dexec.mainClass="io.fusionauth.example.jwt.Hmac"`
## Environment
Tested on java 15.0.1
JWTs originally built by [FusionAuth](http://fusionauth.io).