Merge pull request 'by Robin at 20240425' (#335) from dev-feat-IRONFANS-70-Robin into feat-IRONFANS-70
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/335
This commit is contained in:
commit
f7ae3aa297
|
@ -157,6 +157,7 @@ func (p *Token) OpVerifyValid(ctx *gin.Context, token *jwt.Token) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("failed to acquire token_uuid from token")
|
||||
}
|
||||
logger.Info("token_uuid: %v", tokenUuid)
|
||||
|
||||
list, err := p.OpList(ctx, &tokenproto.OpListReq{
|
||||
Id: tokenUuid,
|
||||
|
@ -164,6 +165,11 @@ func (p *Token) OpVerifyValid(ctx *gin.Context, token *jwt.Token) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("OpList failed")
|
||||
}
|
||||
if len(list) > 0 {
|
||||
for _, v := range list {
|
||||
logger.Info("token_id: %v, token_mid: %v", v.Id, v.Mid)
|
||||
}
|
||||
}
|
||||
if len(list) == 0 {
|
||||
return fmt.Errorf("登录失效,请重新登录!")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue