@Component public class AccountLockoutManager extends Object
AccountLockoutManager keeps track of successive failed login
attempts and locks the user account if there are more than {
lockAfterXFailures successive failures.| Modifier and Type | Class and Description |
|---|---|
static class |
AccountLockoutManager.AttemptStatistics
The Class AttemptStatistics.
|
| Constructor and Description |
|---|
AccountLockoutManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
handleFailedLogin(String userName)
Update failed attempt statistics on failed login.
|
void |
handleSuccessfulLogin(String userName)
Reset failed attempt statistics on successful login and update the last login date.
|
void |
setLockAfterXFailures(int lockAfterXFailures)
Set number of successive failed login attempts that result in account
lockout.
|
void |
setLockoutTime(int lockoutTime)
Set account lockout time.
|
public void setLockoutTime(int lockoutTime)
lockoutTime - the new lockout timepublic void setLockAfterXFailures(int lockAfterXFailures)
lockAfterXFailures - the new lock after X failurespublic void handleSuccessfulLogin(String userName)
userName - the user namepublic void handleFailedLogin(String userName)
userName - the user nameCopyright © 2020 Global Crop Diversity Trust. All rights reserved.