mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #13301 from mitake/jwt-exp-log
server/auth: avoid logging for JWT token
This commit is contained in:
commit
43e39d362d
@ -62,7 +62,6 @@ func (t *tokenJWT) info(ctx context.Context, token string, rev uint64) (*AuthInf
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
t.lg.Warn(
|
t.lg.Warn(
|
||||||
"failed to parse a JWT token",
|
"failed to parse a JWT token",
|
||||||
zap.String("token", token),
|
|
||||||
zap.Error(err),
|
zap.Error(err),
|
||||||
)
|
)
|
||||||
return nil, false
|
return nil, false
|
||||||
@ -70,7 +69,7 @@ func (t *tokenJWT) info(ctx context.Context, token string, rev uint64) (*AuthInf
|
|||||||
|
|
||||||
claims, ok := parsed.Claims.(jwt.MapClaims)
|
claims, ok := parsed.Claims.(jwt.MapClaims)
|
||||||
if !parsed.Valid || !ok {
|
if !parsed.Valid || !ok {
|
||||||
t.lg.Warn("invalid JWT token", zap.String("token", token))
|
t.lg.Warn("failed to obtain claims from a JWT token")
|
||||||
return nil, false
|
return nil, false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user