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 ofDeviceVerificationRequestHandlerSpiinterface.- 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 StringgetUserCode()Get the value of the user code that the end-user input.javax.ws.rs.core.ResponseonExpired()Return a response to the end-user when the value ofactionparameter contained in the response from Authlete/api/device/verificationAPI isEXPIRED, which means the user code has expired.javax.ws.rs.core.ResponseonNotExist()Return a response to the end-user when the value ofactionparameter contained in the response from Authlete/api/device/verificationAPI isNOT_EXIST, which means the user code does not exist.javax.ws.rs.core.ResponseonServerError()Return a response to the end-user when the value ofactionparameter contained in the response from Authlete/api/device/verificationAPI isSERVER_ERROR, which means an error occurred on Authlete side.javax.ws.rs.core.ResponseonValid(com.authlete.common.dto.DeviceVerificationResponse response)Return a response to the end-user when the value ofactionparameter contained in the response from Authlete/api/device/verificationAPI 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:DeviceVerificationRequestHandlerSpiGet the value of the user code that the end-user input.- Specified by:
getUserCodein 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:DeviceVerificationRequestHandlerSpiReturn a response to the end-user when the value ofactionparameter contained in the response from Authlete/api/device/verificationAPI 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:
onValidin interfaceDeviceVerificationRequestHandlerSpi- Parameters:
response- A Response from Authlete's/api/device/verificationAPI.- Returns:
- A response to the end-user.
-
onExpired
public javax.ws.rs.core.Response onExpired()
Description copied from interface:DeviceVerificationRequestHandlerSpiReturn a response to the end-user when the value ofactionparameter contained in the response from Authlete/api/device/verificationAPI 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:
onExpiredin interfaceDeviceVerificationRequestHandlerSpi- Returns:
- A response to the end-user.
-
onNotExist
public javax.ws.rs.core.Response onNotExist()
Description copied from interface:DeviceVerificationRequestHandlerSpiReturn a response to the end-user when the value ofactionparameter contained in the response from Authlete/api/device/verificationAPI 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:
onNotExistin interfaceDeviceVerificationRequestHandlerSpi- Returns:
- A response to the end-user.
-
onServerError
public javax.ws.rs.core.Response onServerError()
Description copied from interface:DeviceVerificationRequestHandlerSpiReturn a response to the end-user when the value ofactionparameter contained in the response from Authlete/api/device/verificationAPI 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:
onServerErrorin interfaceDeviceVerificationRequestHandlerSpi- Returns:
- A response to the end-user.
-
-