mirror of
https://github.com/PlayEdu/PlayEdu
synced 2026-02-03 07:11:55 +08:00
@@ -67,6 +67,9 @@ public class LoginBus {
|
||||
public HashMap<String, Object> tokenByLdapTransformUser(LdapTransformUser ldapTransformUser)
|
||||
throws ServiceException {
|
||||
User user = ldapBus.singleUserSync(ldapTransformUser, appConfigService.defaultAvatar());
|
||||
if (user == null) {
|
||||
throw new ServiceException("用户状态异常,无法登录!");
|
||||
}
|
||||
return tokenByUser(user);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,14 +119,7 @@ public class LoginController {
|
||||
|
||||
try {
|
||||
LdapTransformUser ldapTransformUser =
|
||||
LdapUtil.loginByMailOrUid(
|
||||
ldapConfig.getUrl(),
|
||||
ldapConfig.getAdminUser(),
|
||||
ldapConfig.getAdminPass(),
|
||||
ldapConfig.getBaseDN(),
|
||||
mail,
|
||||
uid,
|
||||
req.getPassword());
|
||||
LdapUtil.loginByMailOrUid(ldapConfig, mail, uid, req.getPassword());
|
||||
if (ldapTransformUser == null) {
|
||||
return JsonResponse.error("登录失败.请检查账号和密码");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user