fix incorrect error checking for NBF (#47)

This commit is contained in:
hmkwizu 2020-02-04 01:30:09 +03:00 committed by GitHub
parent 38b5b1fc41
commit b14bfcd999
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +110,7 @@ func VerifyRequest(ja *JWTAuth, r *http.Request, findTokenFns ...func(r *http.Re
return token, ErrExpired return token, ErrExpired
} else if verr.Errors&jwt.ValidationErrorIssuedAt > 0 { } else if verr.Errors&jwt.ValidationErrorIssuedAt > 0 {
return token, ErrIATInvalid return token, ErrIATInvalid
} else if verr.Errors&jwt.ValidationErrorIssuedAt > 0 { } else if verr.Errors&jwt.ValidationErrorNotValidYet > 0 {
return token, ErrNBFInvalid return token, ErrNBFInvalid
} }
} }