Class ExecutableResponse
java.lang.Object
com.google.auth.oauth2.ExecutableResponse
Encapsulates response values for the 3rd party executable response (e.g. OIDC, SAML, error
responses).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) StringReturns the error code if the execution was unsuccessful, null otherwise.(package private) StringReturns the error message if the execution was unsuccessful, null otherwise.(package private) LongReturns the subject token expiration time in seconds (Unix epoch time).(package private) StringReturns the subject token if the execution was successful, null otherwise.(package private) StringReturns the 3rd party subject token type.(package private) intReturns the version of the executable output.(package private) booleanReturns true if the subject token is expired, false otherwise.(package private) booleanReturns the status of the response.(package private) booleanisValid()Returns whether the execution was successful and returned an unexpired token.private static intparseIntField(Object field) private static longparseLongField(Object field)
-
Field Details
-
SAML_SUBJECT_TOKEN_TYPE
- See Also:
-
version
private final int version -
success
private final boolean success -
expirationTime
-
tokenType
-
subjectToken
-
errorCode
-
errorMessage
-
-
Constructor Details
-
ExecutableResponse
ExecutableResponse(com.google.api.client.json.GenericJson json) throws IOException - Throws:
IOException
-
-
Method Details
-
getVersion
int getVersion()Returns the version of the executable output. Only version `1` is currently supported. This is useful for future changes to the expected output format.- Returns:
- The version of the JSON output.
-
isSuccessful
boolean isSuccessful()Returns the status of the response.When this is true, the response will contain the 3rd party token for a sign in / refresh operation. When this is false, the response should contain an additional error code and message.
- Returns:
- Whether the `success` field in the executable response is true.
-
isExpired
boolean isExpired()Returns true if the subject token is expired, false otherwise. -
isValid
boolean isValid()Returns whether the execution was successful and returned an unexpired token. -
getExpirationTime
-
getTokenType
-
getSubjectToken
-
getErrorCode
-
getErrorMessage
-
parseIntField
-
parseLongField
-