mirror of
https://forgejo.merr.is/annika/jwtauth.git
synced 2025-12-10 11:57:40 -05:00
README
This commit is contained in:
parent
ecb7305746
commit
4e5a7fd5c2
2 changed files with 12 additions and 1 deletions
11
README.md
11
README.md
|
|
@ -103,6 +103,17 @@ func router() http.Handler {
|
|||
}
|
||||
```
|
||||
|
||||
# Util
|
||||
|
||||
See https://github.com/goware/jwtutil for utility to help you generate JWT tokens.
|
||||
|
||||
`go install github.com/goware/jwtutil`
|
||||
|
||||
Usage: `jwtutil -secret=secret -encode -claims='{"user_id":111}'`
|
||||
|
||||
Output: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoxMTF9._cLJn0xFS0Mdr_4L_8XF8-8tv7bHyOQJXyWaNsSqlEs`
|
||||
|
||||
|
||||
# LICENSE
|
||||
|
||||
[MIT](/LICENSE)
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ import (
|
|||
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/go-chi/jwtauth/v5"
|
||||
"github.com/lestrrat-go/jwx/jwt"
|
||||
"github.com/lestrrat-go/jwx/v2/jwt"
|
||||
)
|
||||
|
||||
var tokenAuth *jwtauth.JWTAuth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue