Class SecurityManager

java.lang.Object
io.goobi.viewer.controller.SecurityManager

public class SecurityManager extends Object
  • Constructor Details

    • SecurityManager

      public SecurityManager()
  • Method Details

    • reset

      public void reset()
      Resets all maps. Used for unit tests.
    • isRequireCaptcha

      public boolean isRequireCaptcha(String ipAddress)
      Parameters:
      ipAddress - IP address to check
      Returns:
      true if captcha is appropriate; false otherwise
    • getDelayForUserName

      public long getDelayForUserName(String userName)
      Parameters:
      userName - User name / e-mail address to check
      Returns:
      Current login delay for the given userName
    • getDelayForIpAddress

      public long getDelayForIpAddress(String ipAddress)
      Parameters:
      ipAddress - IP address to check
      Returns:
      Current login delay for the given ipAddress
    • addFailedLoginAttemptForUserName

      public void addFailedLoginAttemptForUserName(String userName)
      Adds to the failed attempts counter for the given user name.
      Parameters:
      userName - User name / e-mail address
    • addFailedLoginAttemptForIpAddress

      public void addFailedLoginAttemptForIpAddress(String ipAddress)
      Adds to the failed attempts counter for the given IP address.
      Parameters:
      ipAddress - IP address
    • resetFailedLoginAttemptForUserName

      public void resetFailedLoginAttemptForUserName(String userName)
      Removes failed login attempt history for given user name.
      Parameters:
      userName - User name / e-mail address
    • resetFailedLoginAttemptForIpAddress

      public void resetFailedLoginAttemptForIpAddress(String ipAddress)
      Removes failed login attempt history for given IP address.
      Parameters:
      ipAddress - IP address