Class AccountLockoutManager
- java.lang.Object
-
- org.genesys.blocks.security.lockout.AccountLockoutManager
-
@Component public class AccountLockoutManager extends Object
{#linkAccountLockoutManagerkeeps track of successive failed login attempts and locks the user account if there are more than {lockAfterXFailuressuccessive failures.- Author:
- Matija Obreza, matija.obreza@croptrust.org
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAccountLockoutManager.AttemptStatisticsThe Class AttemptStatistics.
-
Constructor Summary
Constructors Constructor Description AccountLockoutManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleFailedLogin(String userName)Update failed attempt statistics on failed login.voidhandleSuccessfulLogin(String userName)Reset failed attempt statistics on successful login.voidsetLockAfterXFailures(int lockAfterXFailures)Set number of successive failed login attempts that result in account lockout.voidsetLockoutTime(int lockoutTime)Set account lockout time.
-
-
-
Method Detail
-
setLockoutTime
public void setLockoutTime(int lockoutTime)
Set account lockout time.- Parameters:
lockoutTime- the new lockout time
-
setLockAfterXFailures
public void setLockAfterXFailures(int lockAfterXFailures)
Set number of successive failed login attempts that result in account lockout.- Parameters:
lockAfterXFailures- the new lock after X failures
-
handleSuccessfulLogin
public void handleSuccessfulLogin(String userName)
Reset failed attempt statistics on successful login.- Parameters:
userName- the user name
-
handleFailedLogin
public void handleFailedLogin(String userName)
Update failed attempt statistics on failed login.- Parameters:
userName- the user name
-
-