Class LoginManagement

java.lang.Object
ecmwf.common.security.LoginManagement

public final class LoginManagement extends Object
The Class LoginManagement.
  • Constructor Details

    • LoginManagement

      public LoginManagement()
  • Method Details

    • clear

      public static void clear()
      Remove all the hosts from the banned list.
    • clear

      public static void clear(String host)
      Remove the specified host from the banned list.
      Parameters:
      host - the host
    • increment

      public static void increment(String host)
      Increment. Called when there is an error trying to login from this host (e.g. password refused or user not registered). This method only record the error if the login management module is activated.
      Parameters:
      host - the host
    • check

      public static boolean check(String host)
      Check. Called before to start the login process to make sure this host is not already banned.
      Parameters:
      host - the host
      Returns:
      true, if successful
    • isPasscode

      public static boolean isPasscode(String passcode)
      Checks if the password has the right format.
      Parameters:
      passcode - the passcode
      Returns:
      true, if it looks like a valid passcode
    • check

      public static void check(String host, String user, String passcode) throws EccmdException
      Called to check if the password looks good and if it does not: increment the banned counter and delay the answer.
      Parameters:
      host - the host
      user - the user
      passcode - the passcode
      Throws:
      EccmdException - the eccmd exception