Class TOTP

java.lang.Object
ecmwf.common.security.TOTP

public class TOTP extends Object
The Class TOTP.
  • Field Details

    • ACTIVE

      public static final boolean ACTIVE
      The Constant ACTIVE.
    • URL

      public static final String URL
      The Constant URL.
    • CLIENT_ID_FOR_PASSWORD

      public static final String CLIENT_ID_FOR_PASSWORD
      The Constant CLIENT_ID_FOR_PASSWORD.
    • CLIENT_SECRET_FOR_PASSWORD

      public static final String CLIENT_SECRET_FOR_PASSWORD
      The Constant CLIENT_SECRET_FOR_PASSWORD.
    • CLIENT_ID_FOR_PASSCODE

      public static final String CLIENT_ID_FOR_PASSCODE
      The Constant CLIENT_ID_FOR_PASSCODE.
    • CLIENT_SECRET_FOR_PASSCODE

      public static final String CLIENT_SECRET_FOR_PASSCODE
      The Constant CLIENT_SECRET_FOR_PASSCODE.
    • GRANT_TYPE

      public static final String GRANT_TYPE
      The Constant GRANT_TYPE.
    • EXPECTED_STATUS

      public static final int EXPECTED_STATUS
      The Constant EXPECTED_STATUS.
  • Method Details

    • authenticate

      public static boolean authenticate(String user, String credentials, boolean isPasscode) throws IOException, URISyntaxException
      Authenticate.
      Parameters:
      user - the user
      credentials - the credentials
      isPasscode - the is passcode
      Returns:
      true, if successful
      Throws:
      IOException - Signals that an I/O exception has occurred.
      URISyntaxException - the URI syntax exception