mirror of
https://github.com/go-kratos/kratos.git
synced 2026-05-22 10:15:24 +02:00
fix: 'tokenInfo' might have 'nil' or bad value (#1534)
* fix: 'tokenInfo' might have 'nil' or bad value * fix: return the origin err
This commit is contained in:
@@ -93,6 +93,7 @@ func Server(keyFunc jwt.Keyfunc, opts ...Option) middleware.Middleware {
|
||||
return nil, ErrTokenParseFail
|
||||
}
|
||||
}
|
||||
return nil, errors.Unauthorized("UNAUTHORIZED", err.Error())
|
||||
} else if !tokenInfo.Valid {
|
||||
return nil, ErrTokenInvalid
|
||||
} else if tokenInfo.Method != o.signingMethod {
|
||||
|
||||
Reference in New Issue
Block a user