public class BackchannelAuthenticationIssueResponse extends ApiResponse
/api/backchannel/authentication/issue API.
Authlete's /api/backchannel/authentication/issue API returns JSON
which can be mapped to this class. The authorization server implementation
should retrieve the value of action from the response and take the
following steps according to the value.
OK
When the value of action is OK, it means that Authlete has
succeeded in preparing JSON that contains an auth_req_id. The JSON
should be used as the response body of the response which is returned to
the client from the backchannel authentication endpoint. The
getResponseContent() method returns the JSON.
The following illustrates the response which the authorization server implementation should generate and return to the client application.
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
(The value returned from getResponseContent())
INTERNAL_SERVER_ERROR
When the value of action is INTERNAL_SERVER_ERROR, it means
that an error occurred in Authlete.
From a viewpoint of the client application, this is an error on the server
side. Therefore, the authorization server implementation should generate a
response to the client application with 500 Internal Server Error
and application/json.
The getResponseContent() method returns a JSON string which
describes the error, so it can be used as the entity body of the response.
The following illustrates the response which the authorization server implementation should generate and return to the client application.
HTTP/1.1 500 Internal Server Error
Content-Type: application/json
Cache-Control: no-store
Pragma: no-cache
(The value returned from getResponseContent())
INVALID_TICKET
When the value of action is INVALID_TICKET, it means that
the ticket included in the API call was invalid. For example, it does not
exist or has expired.
From a viewpoint of the client application, this is an error on the server
side. Therefore, the authorization server implementation should generate a
response to the client application with 500 Internal Server Error
and application/json.
You can build an error response in the same way as shown in the description
for the case of INTERNAL_SERVER_ERROR.
| Modifier and Type | Class and Description |
|---|---|
static class |
BackchannelAuthenticationIssueResponse.Action
The next action that the OpenID provider implementation should take.
|
| Constructor and Description |
|---|
BackchannelAuthenticationIssueResponse() |
| Modifier and Type | Method and Description |
|---|---|
BackchannelAuthenticationIssueResponse.Action |
getAction()
Get the next action that the OpenID provider implementation should take.
|
String |
getAuthReqId()
Get the issued authentication request ID.
|
int |
getExpiresIn()
Get the duration of the issued authentication request ID in seconds.
|
int |
getInterval()
Get the minimum amount of time in seconds that the client must wait for
between polling requests to the token endpoint.
|
String |
getResponseContent()
Get the content of the response body of the response to the client
application.
|
BackchannelAuthenticationIssueResponse |
setAction(BackchannelAuthenticationIssueResponse.Action action)
Set the next action that the OpenID provider implementation should take.
|
BackchannelAuthenticationIssueResponse |
setAuthReqId(String authReqId)
Set the issued authentication request ID.
|
BackchannelAuthenticationIssueResponse |
setExpiresIn(int expiresIn)
Set the duration of the issued authentication request ID in seconds.
|
BackchannelAuthenticationIssueResponse |
setInterval(int interval)
Set the minimum amount of time in seconds that the client must wait for
between polling requests to the token endpoint.
|
BackchannelAuthenticationIssueResponse |
setResponseContent(String responseContent)
Set the content of the response body of the response to the client
application.
|
getResultCode, getResultMessage, setResultCode, setResultMessagepublic BackchannelAuthenticationIssueResponse()
public BackchannelAuthenticationIssueResponse.Action getAction()
public BackchannelAuthenticationIssueResponse setAction(BackchannelAuthenticationIssueResponse.Action action)
action - The next action.this object.public String getResponseContent()
In successful cases, the content contains auth_req_id. In error
cases, the content contains error.
public BackchannelAuthenticationIssueResponse setResponseContent(String responseContent)
responseContent - The content of the response body of the response to the client
application.this object.public String getAuthReqId()
auth_req_id property in the response to the client.auth_req_id).public BackchannelAuthenticationIssueResponse setAuthReqId(String authReqId)
auth_req_id property in the response to the client.authReqId - The issued authentication request ID (auth_req_id).this object.public int getExpiresIn()
expires_in property in the response
to the client.expires_in).public BackchannelAuthenticationIssueResponse setExpiresIn(int expiresIn)
expires_in property in the response
to the client.expiresIn - The duration of the issued authentication request ID in seconds
(expires_in).this object.public int getInterval()
interval property in the response to the client.
The value returned from this method has no meaning when the backchannel
token delivery mode is "push".
public BackchannelAuthenticationIssueResponse setInterval(int interval)
interval property in the response to the client.interval - The minimum amount of time in seconds between polling requests.this object.Copyright © 2019. All rights reserved.