Class TOTP
java.lang.Object
ecmwf.common.security.TOTP
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean
The Constant ACTIVE.static final String
The Constant CLIENT_ID_FOR_PASSCODE.static final String
The Constant CLIENT_ID_FOR_PASSWORD.static final String
The Constant CLIENT_SECRET_FOR_PASSCODE.static final String
The Constant CLIENT_SECRET_FOR_PASSWORD.static final int
The Constant EXPECTED_STATUS.static final String
The Constant GRANT_TYPE.static final String
The Constant URL. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
authenticate
(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
-