An open API service indexing awesome lists of open source software.

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

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