Skip to content

Commit

Permalink
feat: jwt KeyFunc external return (#2809)
Browse files Browse the repository at this point in the history
* Update jwt.go

* Update jwt.go
  • Loading branch information
songzhibin97 authored May 4, 2023
1 parent 520b321 commit aed172b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions middleware/auth/jwt/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit aed172b

Please sign in to comment.