Interface BruteForceProtection

All Known Implementing Classes:
BruteForceProtectionImpl

public interface BruteForceProtection
Class is responsible for the brute-force protection on user authentication.
  • Method Details

    • isBlocked

      boolean isBlocked(String username, String ipAddress)
      Returns a number of login attempts left for the specified pair of login and IP-address.
      Parameters:
      username - username.
      ipAddress - user IP-address.
      Returns:
      true if count of login attempts left.
    • registerLoginFailed

      void registerLoginFailed(String username, String ipAddress)
      Registers unsuccessful login attempt.
    • isProtectionEnabled

      boolean isProtectionEnabled()
      Returns:
      true if brute-force protection is enabled in application settings.
    • registerLoginSucceeded

      void registerLoginSucceeded(String username, String ipAddress)
      Registers successful login attempt. Clear attempts count for user.
      Parameters:
      username - username.
      ipAddress - user IP-address.