jwtauth.New to accept jwt.ValidateOptions

This commit is contained in:
Peter Kieltyka 2023-11-21 15:57:10 -05:00
parent 19f55ff778
commit fc3832839d
6 changed files with 69 additions and 40 deletions

View file

@ -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())