11
This commit is contained in:
parent
447f84ec6d
commit
d0921a26b2
|
@ -198,7 +198,7 @@ func (l *DataTransferLogic) checkAuth(r *http.Request) (isAuth bool, userInfo *a
|
|||
claims, err := l.svcCtx.ParseJwtToken(r)
|
||||
// 如果解析JWT token出错,则返回未授权的JSON响应并记录错误消息
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
logx.Error("ParseJwtToken err:", err)
|
||||
return false, nil
|
||||
}
|
||||
if claims != nil {
|
||||
|
@ -206,12 +206,9 @@ func (l *DataTransferLogic) checkAuth(r *http.Request) (isAuth bool, userInfo *a
|
|||
userInfo, err = auth.GetUserInfoFormMapClaims(claims)
|
||||
// 如果获取用户信息出错,则返回未授权的JSON响应并记录错误消息
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
logx.Error("GetUserInfoFormMapClaims err:", err)
|
||||
return false, nil
|
||||
}
|
||||
//todo 对接登录后要删除
|
||||
userInfo.UserId = 39
|
||||
userInfo.GuestId = 0
|
||||
return true, userInfo
|
||||
}
|
||||
//白板用户
|
||||
|
|
Loading…
Reference in New Issue
Block a user