This commit is contained in:
parent
f4380e6b52
commit
fd7cec8224
|
@ -2,6 +2,7 @@ package logic
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"service/api/base"
|
||||
tokenproto "service/api/proto/token/proto"
|
||||
"service/app/mix/dao"
|
||||
"service/dbstruct"
|
||||
|
@ -168,5 +169,11 @@ func (p *Token) OpVerifyValid(ctx *gin.Context, token *jwt.Token) (int64, error)
|
|||
return -1, fmt.Errorf("登录失效,请重新登录!")
|
||||
}
|
||||
|
||||
// 校验是否本人
|
||||
req := ctx.MustGet("client_req").(base.BaseRequestAccessible)
|
||||
if list[1].Mid != req.GetBaseRequest().Mid {
|
||||
return -1, fmt.Errorf("非法令牌!")
|
||||
}
|
||||
|
||||
return tokenUuid, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue