This commit is contained in:
laodaming 2023-11-21 17:12:33 +08:00
parent 4c919de552
commit 67035477c1

View File

@ -66,7 +66,7 @@ func (l *LdapUserLoginLogic) LdapUserLogin(req *types.LdapUserLoginReq, userinfo
return resp.SetStatusWithMessage(basic.CodeServiceErr, "密码错误!")
}
//生成token
token, err := ldapServer.GenJwtToken(ldapUserInfo.UserId, 36000, ldapUserInfo.UserDN, ldapUserInfo.Password)
token, err := ldapServer.GenJwtToken(ldapUserInfo.UserId, l.svcCtx.Config.Auth.AccessExpire, ldapUserInfo.UserDN, ldapUserInfo.Password)
if err != nil {
logx.Error(err)
return resp.SetStatusWithMessage(basic.CodeServiceErr, "生成登录凭证失败")