mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-26 03:52:12 +02:00
feat: jwt KeyFunc external return (#2809)
* Update jwt.go * Update jwt.go
This commit is contained in:
parent
520b321fe9
commit
aed172b8dd
@ -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…
x
Reference in New Issue
Block a user