feat(auth): 在登录响应中添加会话限制信息
Build docker and publish / build (20.15.1) (push) Successful in 7m32s

在LoginResponse结构体中新增Limit字段,用于返回用户最大会话数限制
修复userLoginLogic.go和telephoneLoginLogic.go中的缩进问题
This commit is contained in:
2025-11-26 22:57:10 -08:00
parent 7e32c571ab
commit 236fa6c4e6
5 changed files with 14 additions and 7 deletions
@@ -79,7 +79,10 @@ func (l *OAuthLoginGetTokenLogic) OAuthLoginGetToken(req *types.OAuthLoginGetTok
}
loginStatus = true
return &types.LoginResponse{Token: token}, nil
return &types.LoginResponse{
Token: token,
Limit: l.svcCtx.Config.JwtAuth.MaxSessionsPerUser,
}, nil
}
func (l *OAuthLoginGetTokenLogic) google(req *types.OAuthLoginGetTokenRequest, requestID, ip, userAgent string) (*user.User, error) {