From 4ffcf0a6a6c100abc36467c3d17488e661d6916b Mon Sep 17 00:00:00 2001 From: Leufolium Date: Thu, 25 Apr 2024 18:31:34 +0800 Subject: [PATCH] by Robin at 20240425 --- app/mix/service/logic/token.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/mix/service/logic/token.go b/app/mix/service/logic/token.go index bd6dc2d3..52deae54 100644 --- a/app/mix/service/logic/token.go +++ b/app/mix/service/logic/token.go @@ -8,7 +8,6 @@ import ( "service/library/configcenter" "service/library/idgenerator" "service/library/logger" - "service/library/redis" "strconv" "time" @@ -158,9 +157,6 @@ func (p *Token) OpVerifyValid(ctx *gin.Context, token *jwt.Token) error { if err != nil { return fmt.Errorf("failed to acquire token_uuid from token") } - if ctx.Request.Header.Get("Is-For-Test") != "" { - redis.GetRedisClient().Set("token:token_uuid", tokenUuid, 300) - } list, err := p.OpList(ctx, &tokenproto.OpListReq{ Id: tokenUuid, @@ -168,14 +164,6 @@ func (p *Token) OpVerifyValid(ctx *gin.Context, token *jwt.Token) error { if err != nil { return fmt.Errorf("OpList failed") } - if ctx.Request.Header.Get("Is-For-Test") != "" { - if len(list) > 0 { - for i, v := range list { - redis.GetRedisClient().Set("token:"+fmt.Sprint(i), v.Id, 300) - } - } - } - if len(list) == 0 { return fmt.Errorf("登录失效,请重新登录!") }