| | |
| | | |
| | | if (policy.getLockoutFailureCount() > 0) |
| | | { |
| | | generateAccountStatusNotificationForLockedBindAccount(userEntry, |
| | | pwPolicyState); |
| | | updateFailureCount(userEntry, pwPolicyState); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (saslHandler.isPasswordBased(saslMechanism) |
| | | && pwPolicyState.getAuthenticationPolicy().getLockoutFailureCount() > 0) |
| | | { |
| | | generateAccountStatusNotificationForLockedBindAccount( |
| | | saslAuthUserEntry, pwPolicyState); |
| | | updateFailureCount(saslAuthUserEntry, pwPolicyState); |
| | | } |
| | | } |
| | | } |
| | |
| | | return true; |
| | | } |
| | | |
| | | private void generateAccountStatusNotificationForLockedBindAccount( |
| | | Entry userEntry, PasswordPolicyState pwPolicyState) |
| | | private void updateFailureCount(Entry userEntry, PasswordPolicyState pwPolicyState) |
| | | { |
| | | if (pwPolicyState.lockedDueToFailures()) |
| | | { |
| | | // Account is already locked, nothing to do |
| | | return; |
| | | } |
| | | pwPolicyState.updateAuthFailureTimes(); |
| | | if (pwPolicyState.lockedDueToFailures()) |
| | | { |