public class TokenUpdateResponse extends ApiResponse
/auth/token/update API.
Authlete's /auth/token/update API returns JSON which can
be mapped to this class. The first step that a caller should take is
to retrieve the value of action parameter from the response.
The list below shows possible values of action parameter and
their meanings.
INTERNAL_SERVER_ERRORWhen the value of
actionparameter is"INTERNAL_SERVER_ERROR", it means that an error occurred on Authlete side.BAD_REQUESTWhen the value of
actionparameter is"BAD_REQUEST", it means that the request from the caller was wrong. For example, this happens when theaccessTokenrequest parameter is not specified.FORBIDDENWhen the value of
actionparameter is"FORBIDDEN", it means that the request from the caller is not allowed. For example, this happens when the access token identified by theaccessTokenrequest parameter does not belong to the service identified by the API key used for the API call.NOT_FOUNDWhen the value of
actionparameter is"NOT_FOUND", it means that the specified access token does not exist.OKWhen the value of
actionparameter is"OK", it means that the access token was updated successfully.
| Modifier and Type | Class and Description |
|---|---|
static class |
TokenUpdateResponse.Action
The code indicating how the response should be interpreted.
|
| Constructor and Description |
|---|
TokenUpdateResponse() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAccessToken()
Get the access token which has been specified by
TokenUpdateRequest. |
long |
getAccessTokenExpiresAt()
Get the date at which the access token will expire.
|
TokenUpdateResponse.Action |
getAction()
Get the code indicating how the response should be interpreted.
|
Property[] |
getProperties()
Get the properties associated with the access token.
|
String[] |
getScopes()
Get the scopes associated with the access token.
|
String |
getTokenType()
Get the token type associated with the access token.
|
TokenUpdateResponse |
setAccessToken(String accessToken)
Set the access token which has been specified by
TokenUpdateRequest. |
TokenUpdateResponse |
setAccessTokenExpiresAt(long expiresAt)
Set the date at which the access token will expire.
|
TokenUpdateResponse |
setAction(TokenUpdateResponse.Action action)
Set the code indicating how the response should be interpreted.
|
TokenUpdateResponse |
setProperties(Property[] properties)
Set the properties associated with the access token.
|
TokenUpdateResponse |
setScopes(String[] scopes)
Set the scopes associated with the access token.
|
TokenUpdateResponse |
setTokenType(String tokenType)
Set the token type associated with the access token.
|
String |
summarize()
Get the summary of this instance.
|
getResultCode, getResultMessage, setResultCode, setResultMessagepublic TokenUpdateResponse.Action getAction()
description of this class
for details.public TokenUpdateResponse setAction(TokenUpdateResponse.Action action)
description of this class
for details.action - The code indicating how the response should be interpreted.this object.public String getAccessToken()
TokenUpdateRequest.public TokenUpdateResponse setAccessToken(String accessToken)
TokenUpdateRequest.accessToken - Access token.this object.public long getAccessTokenExpiresAt()
public TokenUpdateResponse setAccessTokenExpiresAt(long expiresAt)
expiresAt - The expiration date in milliseconds since the Unix epoch (1970-01-01).this object.public String[] getScopes()
null.public TokenUpdateResponse setScopes(String[] scopes)
scopes - Scopes.this object.public Property[] getProperties()
null.public TokenUpdateResponse setProperties(Property[] properties)
properties - Properties.this object.public String getTokenType()
public TokenUpdateResponse setTokenType(String tokenType)
tokenType - Token type. (example: Bearer)this object.public String summarize()
Copyright © 2019. All rights reserved.