OrganizationsCast
机构映射关系 机构namepath重组 登录错误提示信息优化 界面元素优化 HttpRequestAdapter支持JSON
This commit is contained in:
@@ -64,9 +64,6 @@ public class ActiveDirectoryAuthenticationRealm extends AbstractAuthenticationRe
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(!isAuthenticated){
|
||||
throw new BadCredentialsException(WebContext.getI18nValue("login.error.password"));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,17 @@ public class JdbcAuthenticationRealm extends AbstractAuthenticationRealm {
|
||||
if (!passwordMatches) {
|
||||
passwordPolicyValidator.plusBadPasswordCount(userInfo);
|
||||
insertLoginHistory(userInfo, ConstantsLoginType.LOCAL, "", "xe00000004", "password error");
|
||||
throw new BadCredentialsException(WebContext.getI18nValue("login.error.password"));
|
||||
|
||||
if(userInfo.getBadPasswordCount()>=(passwordPolicyValidator.getPasswordPolicy().getAttempts()/2)) {
|
||||
throw new BadCredentialsException(
|
||||
WebContext.getI18nValue("login.error.password.attempts",
|
||||
new Object[]{
|
||||
userInfo.getBadPasswordCount() + 1,
|
||||
passwordPolicyValidator.getPasswordPolicy().getAttempts(),
|
||||
passwordPolicyValidator.getPasswordPolicy().getDuration()}));
|
||||
}else {
|
||||
throw new BadCredentialsException(WebContext.getI18nValue("login.error.password"));
|
||||
}
|
||||
}
|
||||
return passwordMatches;
|
||||
}
|
||||
|
||||
@@ -63,9 +63,6 @@ public class LdapAuthenticationRealm extends AbstractAuthenticationRealm{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(!isAuthenticated){
|
||||
throw new BadCredentialsException(WebContext.getI18nValue("login.error.password"));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user