Class DeviceCompleteResponse
- java.lang.Object
-
- com.authlete.common.dto.ApiResponse
-
- com.authlete.common.dto.DeviceCompleteResponse
-
- All Implemented Interfaces:
Serializable
public class DeviceCompleteResponse extends ApiResponse
Response from Authlete's/api/device/complete
API.Authlete's
/api/device/complete
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.SUCCESS
-
When the value of
action
isSUCCESS
, it means that the API call has been processed successfully. The authorization server should return a successful response to the web browser the end-user is using. INVALID_REQUEST
-
When the value of
action
isINVALID_REQUEST
, it means that the API call is invalid. Probably, the authorization server implementation has some bugs. USER_CODE_EXPIRED
-
When the value of
action
isUSER_CODE_EXPIRED
, it means that the user code included in the API call has expired. The authorization server implementation should tell the end-user that the user code has expired and urge her to re-initiate a device flow. USER_CODE_NOT_EXIST
-
When the value of
action
isUSER_CODE_NOT_EXIST
, it means that the user code included in the API call does not exist. The authorization server implementation should tell the end-user that the user code has been invalidated and urge her to re-initiate a device flow. SERVER_ERROR
-
When the value of
action
isSERVER_ERROR
, it means that an error occurred on Authlete side. The authorization server implementation should tell the end-user that something wrong happened and urge her to re-initiate a device flow.
- Since:
- 2.42, Authlete 2.0.0
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DeviceCompleteResponse.Action
The next action that the authorization server implementation should take.
-
Constructor Summary
Constructors Constructor Description DeviceCompleteResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeviceCompleteResponse.Action
getAction()
Get the next action that the authorization server implementation should take.DeviceCompleteResponse
setAction(DeviceCompleteResponse.Action action)
Set the next action that the authorization server implementation should take.-
Methods inherited from class com.authlete.common.dto.ApiResponse
getResultCode, getResultMessage, setResultCode, setResultMessage
-
-
-
-
Method Detail
-
getAction
public DeviceCompleteResponse.Action getAction()
Get the next action that the authorization server implementation should take.- Returns:
- The next action.
-
setAction
public DeviceCompleteResponse setAction(DeviceCompleteResponse.Action action)
Set the next action that the authorization server implementation should take.- Parameters:
action
- The next action.- Returns:
this
object.
-
-