Class TOTP
java.lang.Object
ecmwf.common.security.TOTP
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanThe Constant ACTIVE.static final StringThe Constant CLIENT_ID_FOR_PASSCODE.static final StringThe Constant CLIENT_ID_FOR_PASSWORD.static final StringThe Constant CLIENT_SECRET_FOR_PASSCODE.static final StringThe Constant CLIENT_SECRET_FOR_PASSWORD.static final intThe Constant EXPECTED_STATUS.static final StringThe Constant GRANT_TYPE.static final StringThe Constant URL. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanauthenticate(String user, String credentials, boolean isPasscode) Authenticate.
-
Field Details
-
ACTIVE
public static final boolean ACTIVEThe Constant ACTIVE. -
URL
The Constant URL. -
CLIENT_ID_FOR_PASSWORD
The Constant CLIENT_ID_FOR_PASSWORD. -
CLIENT_SECRET_FOR_PASSWORD
The Constant CLIENT_SECRET_FOR_PASSWORD. -
CLIENT_ID_FOR_PASSCODE
The Constant CLIENT_ID_FOR_PASSCODE. -
CLIENT_SECRET_FOR_PASSCODE
The Constant CLIENT_SECRET_FOR_PASSCODE. -
GRANT_TYPE
The Constant GRANT_TYPE. -
EXPECTED_STATUS
public static final int EXPECTED_STATUSThe Constant EXPECTED_STATUS.
-
-
Method Details
-
authenticate
public static boolean authenticate(String user, String credentials, boolean isPasscode) throws IOException, URISyntaxException Authenticate.- Parameters:
user- the usercredentials- the credentialsisPasscode- the is passcode- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.URISyntaxException- the URI syntax exception
-