| | |
| | | // The number of grace logins that a user may have. |
| | | private int graceLoginCount = DEFAULT_PWPOLICY_GRACE_LOGIN_COUNT; |
| | | |
| | | // The number of passwords to keep in the history. |
| | | private int historyCount = DEFAULT_PWPOLICY_HISTORY_COUNT; |
| | | |
| | | // The maximum length of time in seconds to keep passwords in the history. |
| | | private int historyDuration = DEFAULT_PWPOLICY_HISTORY_DURATION; |
| | | |
| | | // The maximum length of time in seconds that an account may remain idle |
| | | // before it is locked out. |
| | | private int idleLockoutInterval = DEFAULT_PWPOLICY_IDLE_LOCKOUT_INTERVAL; |
| | |
| | | this.stateUpdateFailurePolicy = configuration.getStateUpdateFailurePolicy(); |
| | | |
| | | |
| | | // Get the password history count and duration. |
| | | this.historyCount = configuration.getPasswordHistoryCount(); |
| | | this.historyDuration = (int) configuration.getPasswordHistoryDuration(); |
| | | |
| | | |
| | | /* |
| | | * Holistic validation. |
| | | */ |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the maximum number of previous passwords to maintain in the |
| | | * password history. |
| | | * |
| | | * @return The maximum number of previous passwords to maintain in the |
| | | * password history. |
| | | */ |
| | | public int getPasswordHistoryCount() |
| | | { |
| | | return historyCount; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the maximum length of time in seconds that previous passwords |
| | | * should remain in the password history. |
| | | * |
| | | * @return The maximum length of time in seconds that previous passwords |
| | | * should remain in the password history. |
| | | */ |
| | | public int getPasswordHistoryDuration() |
| | | { |
| | | return historyDuration; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether users with this password policy will be required to |
| | | * authenticate in a secure manner that does not expose their password. |
| | | * |
| | |
| | | buffer.append(idleLockoutInterval); |
| | | buffer.append(" seconds"); |
| | | buffer.append(EOL); |
| | | |
| | | buffer.append("History Count: "); |
| | | buffer.append(historyCount); |
| | | buffer.append(EOL); |
| | | |
| | | buffer.append("Update Failure Policy: "); |
| | | buffer.append(stateUpdateFailurePolicy.toString()); |
| | | buffer.append(EOL); |
| | | } |
| | | } |
| | | |