mirror of
https://forgejo.merr.is/annika/jwtauth.git
synced 2025-12-13 09:31:11 -05:00
jwtauth.New to accept jwt.ValidateOptions
This commit is contained in:
parent
19f55ff778
commit
fc3832839d
6 changed files with 69 additions and 40 deletions
|
|
@ -84,7 +84,7 @@ func router() http.Handler {
|
|||
// the provided authenticator middleware, but you can write your
|
||||
// own very easily, look at the Authenticator method in jwtauth.go
|
||||
// and tweak it, its not scary.
|
||||
r.Use(jwtauth.Authenticator)
|
||||
r.Use(jwtauth.Authenticator(tokenAuth))
|
||||
|
||||
r.Get("/admin", func(w http.ResponseWriter, r *http.Request) {
|
||||
_, claims, _ := jwtauth.FromContext(r.Context())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue