Class AuthenticationResponse
java.lang.Object
com.targomo.client.api.response.esri.AuthenticationResponse
The POJO for the response from the ESRI authentication. There are two different possible response types:
- (1) the response was an error message (
wasErrorResponse()==true), i.e. error value is set - seeErrorDescription - (2) the request was successful (
wasErrorResponse()==false) and values foraccessTokenandexpiresInare set
-
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationResponse(String accessToken, Integer expiresIn, ErrorDescription error) private - not used since this is a POJO only created from a json String -
Method Summary
-
Constructor Details
-
AuthenticationResponse
private - not used since this is a POJO only created from a json String
-
-
Method Details
-
getAccessToken
- Returns:
- the retrieved access token (may be null if an error occurred during request)
-
getExpiresIn
- Returns:
- time validity for token in seconds (may be null if an error occurred during request)
-
getError
- Returns:
- if an error occurred, the
ErrorDescriptionis returned
-
wasErrorResponse
public boolean wasErrorResponse()- Returns:
trueif error was recorded;falseotherwise
-