OrganizationsCast

机构映射关系
机构namepath重组
登录错误提示信息优化
界面元素优化
HttpRequestAdapter支持JSON
This commit is contained in:
Crystal.Sea
2021-10-31 08:25:59 +08:00
parent 37da95c649
commit 625c2e4336
24 changed files with 749 additions and 172 deletions

View File

@@ -64,9 +64,6 @@ public class ActiveDirectoryAuthenticationRealm extends AbstractAuthenticationRe
return true;
}
}
if(!isAuthenticated){
throw new BadCredentialsException(WebContext.getI18nValue("login.error.password"));
}
return false;
}

View File

@@ -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;
}

View File

@@ -63,9 +63,6 @@ public class LdapAuthenticationRealm extends AbstractAuthenticationRealm{
return true;
}
}
if(!isAuthenticated){
throw new BadCredentialsException(WebContext.getI18nValue("login.error.password"));
}
return false;
}