Package com.authlete.jaxrs.spi
Class DeviceVerificationRequestHandlerSpiAdapter
- java.lang.Object
-
- com.authlete.jaxrs.spi.DeviceVerificationRequestHandlerSpiAdapter
-
- All Implemented Interfaces:
DeviceVerificationRequestHandlerSpi
public class DeviceVerificationRequestHandlerSpiAdapter extends Object implements DeviceVerificationRequestHandlerSpi
Empty implementation ofDeviceVerificationRequestHandlerSpi
interface.- Since:
- 2.18
- Author:
- Hideki Ikeda
-
-
Constructor Summary
Constructors Constructor Description DeviceVerificationRequestHandlerSpiAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getUserCode()
Get the value of the user code that the end-user input.javax.ws.rs.core.Response
onExpired()
Return a response to the end-user when the value ofaction
parameter contained in the response from Authlete/api/device/verification
API isEXPIRED
, which means the user code has expired.javax.ws.rs.core.Response
onNotExist()
Return a response to the end-user when the value ofaction
parameter contained in the response from Authlete/api/device/verification
API isNOT_EXIST
, which means the user code does not exist.javax.ws.rs.core.Response
onServerError()
Return a response to the end-user when the value ofaction
parameter contained in the response from Authlete/api/device/verification
API isSERVER_ERROR
, which means an error occurred on Authlete side.javax.ws.rs.core.Response
onValid(com.authlete.common.dto.DeviceVerificationResponse response)
Return a response to the end-user when the value ofaction
parameter contained in the response from Authlete/api/device/verification
API isVALID
, which means the user code exists, has not expired, and belongs to the service.
-
-
-
Method Detail
-
getUserCode
public String getUserCode()
Description copied from interface:DeviceVerificationRequestHandlerSpi
Get the value of the user code that the end-user input.- Specified by:
getUserCode
in interfaceDeviceVerificationRequestHandlerSpi
- Returns:
- The value of the user code that the end-user input.
-
onValid
public javax.ws.rs.core.Response onValid(com.authlete.common.dto.DeviceVerificationResponse response)
Description copied from interface:DeviceVerificationRequestHandlerSpi
Return a response to the end-user when the value ofaction
parameter contained in the response from Authlete/api/device/verification
API isVALID
, which means the user code exists, has not expired, and belongs to the service. Typically, the authorization server implementation should interact with the end-user to ask whether she approves or rejects the authorization request from the device.- Specified by:
onValid
in interfaceDeviceVerificationRequestHandlerSpi
- Parameters:
response
- A Response from Authlete's/api/device/verification
API.- Returns:
- A response to the end-user.
-
onExpired
public javax.ws.rs.core.Response onExpired()
Description copied from interface:DeviceVerificationRequestHandlerSpi
Return a response to the end-user when the value ofaction
parameter contained in the response from Authlete/api/device/verification
API isEXPIRED
, which means the user code has expired. Typically, the authorization server implementation should tell the end-user that the user code has expired and urge her to re-initiate a device flow.- Specified by:
onExpired
in interfaceDeviceVerificationRequestHandlerSpi
- Returns:
- A response to the end-user.
-
onNotExist
public javax.ws.rs.core.Response onNotExist()
Description copied from interface:DeviceVerificationRequestHandlerSpi
Return a response to the end-user when the value ofaction
parameter contained in the response from Authlete/api/device/verification
API isNOT_EXIST
, which means the user code does not exist. Typically, the authorization server implementation should tell the end-user that the user code is invalid and urge her to retry to input a valid user code.- Specified by:
onNotExist
in interfaceDeviceVerificationRequestHandlerSpi
- Returns:
- A response to the end-user.
-
onServerError
public javax.ws.rs.core.Response onServerError()
Description copied from interface:DeviceVerificationRequestHandlerSpi
Return a response to the end-user when the value ofaction
parameter contained in the response from Authlete/api/device/verification
API isSERVER_ERROR
, which means an error occurred on Authlete side. Typically, the authorization server implementation should tell the end-user that something wrong happened and urge her to re-initiate a device flow.- Specified by:
onServerError
in interfaceDeviceVerificationRequestHandlerSpi
- Returns:
- A response to the end-user.
-
-