Class BackchannelAuthenticationIssueResponse
- java.lang.Object
-
- com.authlete.common.dto.ApiResponse
-
- com.authlete.common.dto.BackchannelAuthenticationIssueResponse
-
- All Implemented Interfaces:
Serializable
public class BackchannelAuthenticationIssueResponse extends ApiResponse
Response from Authlete's/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 ofaction
from the response and take the following steps according to the value.OK
-
When the value of
action
isOK
, it means that Authlete has succeeded in preparing JSON that contains anauth_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. ThegetResponseContent()
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
isINTERNAL_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
andapplication/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
isINVALID_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
andapplication/json
.You can build an error response in the same way as shown in the description for the case of
INTERNAL_SERVER_ERROR
.
- Since:
- 2.32, Authlete 2.0.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BackchannelAuthenticationIssueResponse.Action
The next action that the OpenID provider implementation should take.
-
Constructor Summary
Constructors Constructor Description BackchannelAuthenticationIssueResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class com.authlete.common.dto.ApiResponse
getResultCode, getResultMessage, setResultCode, setResultMessage
-
-
-
-
Method Detail
-
getAction
public BackchannelAuthenticationIssueResponse.Action getAction()
Get the next action that the OpenID provider implementation should take.- Returns:
- The next action.
-
setAction
public BackchannelAuthenticationIssueResponse setAction(BackchannelAuthenticationIssueResponse.Action action)
Set the next action that the OpenID provider implementation should take.- Parameters:
action
- The next action.- Returns:
this
object.
-
getResponseContent
public String getResponseContent()
Get the content of the response body of the response to the client application. Its format is JSON.In successful cases, the content contains
auth_req_id
. In error cases, the content containserror
.- Returns:
- The content of the response body of the response to the client application.
-
setResponseContent
public BackchannelAuthenticationIssueResponse setResponseContent(String responseContent)
Set the content of the response body of the response to the client application.- Parameters:
responseContent
- The content of the response body of the response to the client application.- Returns:
this
object.
-
getAuthReqId
public String getAuthReqId()
Get the issued authentication request ID. This corresponds to theauth_req_id
property in the response to the client.- Returns:
- The issued authentication request ID (
auth_req_id
).
-
setAuthReqId
public BackchannelAuthenticationIssueResponse setAuthReqId(String authReqId)
Set the issued authentication request ID. This corresponds to theauth_req_id
property in the response to the client.- Parameters:
authReqId
- The issued authentication request ID (auth_req_id
).- Returns:
this
object.
-
getExpiresIn
public int getExpiresIn()
Get the duration of the issued authentication request ID in seconds. This corresponds to theexpires_in
property in the response to the client.- Returns:
- The duration of the issued authentication request ID in seconds
(
expires_in
).
-
setExpiresIn
public BackchannelAuthenticationIssueResponse setExpiresIn(int expiresIn)
Set the duration of the issued authentication request ID in seconds. This corresponds to theexpires_in
property in the response to the client.- Parameters:
expiresIn
- The duration of the issued authentication request ID in seconds (expires_in
).- Returns:
this
object.
-
getInterval
public int getInterval()
Get the minimum amount of time in seconds that the client must wait for between polling requests to the token endpoint. This corresponds to theinterval
property in the response to the client.The value returned from this method has no meaning when the backchannel token delivery mode is
"push"
.- Returns:
- The minimum amount of time in seconds between polling requests.
-
setInterval
public 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. This corresponds to theinterval
property in the response to the client.- Parameters:
interval
- The minimum amount of time in seconds between polling requests.- Returns:
this
object.
-
-