Class AccountLockoutManager


  • @Component
    public class AccountLockoutManager
    extends Object
    {#link AccountLockoutManager keeps track of successive failed login attempts and locks the user account if there are more than { lockAfterXFailures successive failures.
    Author:
    Matija Obreza, matija.obreza@croptrust.org
    • Constructor Detail

      • AccountLockoutManager

        public AccountLockoutManager()
    • 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