Skip to content

Commit

Permalink
Authenticator: remove jwt.Validate
Browse files Browse the repository at this point in the history
jwt.Validate is already called in Verifier, no need to call it
twice
  • Loading branch information
drakkan committed Jun 9, 2024
1 parent 1ff6081 commit 127ee7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jwtauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func Authenticator(ja *JWTAuth) func(http.Handler) http.Handler {
return
}

if token == nil || jwt.Validate(token, ja.validateOptions...) != nil {
if token == nil {
http.Error(w, http.StatusText(http.StatusUnauthorized), http.StatusUnauthorized)
return
}
Expand Down

0 comments on commit 127ee7c

Please sign in to comment.