feat: jwt KeyFunc external return (#2809)

* Update jwt.go

* Update jwt.go
pull/2763/merge
Bin 2 years ago committed by GitHub
parent 520b321fe9
commit aed172b8dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      middleware/auth/jwt/jwt.go

@ -114,6 +114,9 @@ func Server(keyFunc jwt.Keyfunc, opts ...Option) middleware.Middleware {
if ve.Errors&(jwt.ValidationErrorExpired|jwt.ValidationErrorNotValidYet) != 0 {
return nil, ErrTokenExpired
}
if ve.Inner != nil {
return nil, ve.Inner
}
return nil, ErrTokenParseFail
}
if !tokenInfo.Valid {

Loading…
Cancel
Save