From d5239365be8af63b6aa9ef7ba7721b0b5a400c85 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Sun, 14 Aug 2022 23:34:51 +0800 Subject: [PATCH] hide jwt not active yet --- pkg/common/token_verify/jwt_token.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/common/token_verify/jwt_token.go b/pkg/common/token_verify/jwt_token.go index 476c26a70..3f9e64fdf 100644 --- a/pkg/common/token_verify/jwt_token.go +++ b/pkg/common/token_verify/jwt_token.go @@ -6,9 +6,10 @@ import ( commonDB "Open_IM/pkg/common/db" "Open_IM/pkg/common/log" "Open_IM/pkg/utils" + "time" + go_redis "github.com/go-redis/redis/v8" "github.com/golang-jwt/jwt/v4" - "time" ) //var ( @@ -103,7 +104,9 @@ func GetClaimFromToken(tokensString string) (*Claims, error) { } else if ve.Errors&jwt.ValidationErrorExpired != 0 { return nil, constant.ErrTokenExpired } else if ve.Errors&jwt.ValidationErrorNotValidYet != 0 { - return nil, constant.ErrTokenNotValidYet + log.Error("", "ParseToken failed, ", err.Error(), token) + return nil, nil + // return nil, constant.ErrTokenNotValidYet } else { return nil, constant.ErrTokenUnknown }