mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
server/auth: avoid logging for JWT token for a case of failed parsing
This commit is contained in:
parent
7101e8569d
commit
2e74e4d636
@ -62,7 +62,6 @@ func (t *tokenJWT) info(ctx context.Context, token string, rev uint64) (*AuthInf
|
||||
if err != nil {
|
||||
t.lg.Warn(
|
||||
"failed to parse a JWT token",
|
||||
zap.String("token", token),
|
||||
zap.Error(err),
|
||||
)
|
||||
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)
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user