modulepackage
0.0.0-20141203095229-6a660fad74dc
Repository: https://github.com/cryptix/jwtauth.git
Documentation: pkg.go.dev
# README
jwtAuth
Some simple Handlers and Helpers to use jwt-go for go http stuff.
Currently only RS256
is supported. If you have need/ideas for key schemes to use HS256
, contact me or open a PR.
Working
MakeToken
for creating signed tokensVerifyHeader
to check if a key is valid
TODO
- Make simple Handler to resign a token (extend its valdity)
- Tests MakeToken
How to get Keys
openssl genrsa -out app.rsa <keysize> # i'd suggest 4096
openssl rsa -in app.rsa -pubout > app.rsa.pub
# Packages
No description provided by the author
# Functions
MakeToken creates a new RS256 signed token.
VerifyHeader checks for the exsistence of a Token in the Request Header it Verifies the Token using the user supplied VerifyFunc func signature is chosen to work with go-tigertonic.If().
# Variables
No description provided by the author
No description provided by the author
Default Header name.
you need to overwrite this to supply your key.