10Duke Java Core
|
Data class that models an OAuth token response.
Public Member Functions | |
long | expiresAt () |
Calculates the timestamp when the access token will expire. | |
boolean | checkIsSuccess () |
Tests if the token response denotes success. | |
boolean | checkIsError () |
Tests if the token response denotes an error. | |
Static Public Attributes | |
static final String | ERROR_CODE_UNKNOWN_ERROR = "unknown_error" |
Client side definition of an error code. | |
boolean tenduke.sdk.core.model.auth.OAuthTokenResponse.checkIsError | ( | ) |
Tests if the token response denotes an error.
boolean tenduke.sdk.core.model.auth.OAuthTokenResponse.checkIsSuccess | ( | ) |
Tests if the token response denotes success.
long tenduke.sdk.core.model.auth.OAuthTokenResponse.expiresAt | ( | ) |
Calculates the timestamp when the access token will expire.
The result is produced by summing the responseReceivedAt timestamp and the expiresIn. If the value of expiresIn or responseReceivedAt is less than 1, then 0 is returned.
|
static |
Client side definition of an error code.
Used for cases where an OAuth flow fails and the response body is empty, is not JSON or does not have an error field.