kongzy
2024-07-01 47a751cb301d05276ae5d75145d57b2d090fe4e1
src/main/java/com/nanometer/smartlab/realm/RetryLimitCredentialsMatcher.java
@@ -65,11 +65,11 @@
         retryCount = new AtomicInteger(0);
         passwordRetryCache.put(username, retryCount);
      }
      if(retryCount.incrementAndGet() > 5) {
      if(retryCount.incrementAndGet() > 8) {
         //if retry count > 5 throw
         logger.warn("username: " + username + " tried to login more than 5 times in period");
         logger.warn("username: " + username + " tried to login more than 8 times in period");
//         FacesUtils.warn("用户名: " + username + " 密码连续输入错误超过5次,锁定5分钟!");
         throw new ExcessiveAttemptsException("用户名: " + username + " 密码连续输入错误超过5次,锁定5分钟!");
         throw new ExcessiveAttemptsException("用户名: " + username + " 密码连续输入错误超过8次,锁定1分钟!");
      }
      boolean matches = super.doCredentialsMatch(authcToken, info);