remove useless log output

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2021-03-25 15:37:22 +08:00
parent 8ca0c86b39
commit b83b3232cb
4 changed files with 8 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ func NewTokenAuthenticator(tokenOperator auth.TokenManagementInterface, userList
func (t *tokenAuthenticator) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error) {
providedUser, err := t.tokenOperator.Verify(token)
if err != nil {
klog.Error(err)
klog.Warning(err)
return nil, false, err
}

View File

@@ -49,7 +49,7 @@ func (s *jwtTokenIssuer) Verify(tokenString string) (user.Info, TokenType, error
// verify token signature and expiration time
_, err := jwt.ParseWithClaims(tokenString, clm, s.keyFunc)
if err != nil {
klog.Error(err)
klog.V(4).Info(err)
return nil, "", err
}
return &user.DefaultInfo{Name: clm.Username, Groups: clm.Groups, Extra: clm.Extra}, clm.TokenType, nil
@@ -77,9 +77,8 @@ func (s *jwtTokenIssuer) IssueTo(user user.Info, tokenType TokenType, expiresIn
token := jwt.NewWithClaims(jwt.SigningMethodHS256, clm)
tokenString, err := token.SignedString(s.secret)
if err != nil {
klog.Error(err)
klog.V(4).Info(err)
return "", err
}