https://github.com/fusionauth/fusionauth-example-go-jwt
JWT manipulation in golang
https://github.com/fusionauth/fusionauth-example-go-jwt
example fusionauth go golang jwt
Last synced: 10 months ago
JSON representation
JWT manipulation in golang
- Host: GitHub
- URL: https://github.com/fusionauth/fusionauth-example-go-jwt
- Owner: FusionAuth
- License: apache-2.0
- Created: 2021-02-09T21:06:33.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-07-28T05:55:01.000Z (over 1 year ago)
- Last Synced: 2024-07-28T06:45:38.442Z (over 1 year ago)
- Topics: example, fusionauth, go, golang, jwt
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 3
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Go JWT Examples
This code uses the go jwt library: https://github.com/golang-jwt/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
* decoding a JWT with the 'hmac' algorithm and the wrong key
* re-issuing an 'rsa' signed JWT with an 'hmac' algorithm
## To install
`go run `
## Environment
Tested on go 1.15.7 and 1.21.1