Package com.authlete.jaxrs
Class DeviceVerificationRequestHandler
- java.lang.Object
-
- com.authlete.jaxrs.DeviceVerificationRequestHandler
-
public class DeviceVerificationRequestHandler extends Object
Handler for getting information associated with a user code that the end-user input at the verification endpoint in OAuth 2.0 Device Authorization Grant (Device Flow).handle()method should be called after the authorization server receives a user code that the end-user input at the verification endpoint. Thehandle()method calls Authlete's/api/device/verificationAPI, receives a response from the API, and dispatches processing according to theactionparameter in the response.- Since:
- 2.18
- Author:
- Hideki Ikeda
-
-
Constructor Summary
Constructors Constructor Description DeviceVerificationRequestHandler(com.authlete.common.api.AuthleteApi api, DeviceVerificationRequestHandlerSpi spi)Constructor with an implementation ofAuthleteApiinterface and an implementation ofDeviceVerificationRequestHandlerSpiinterface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.authlete.jaxrs.AuthleteApiCallergetApiCaller()javax.ws.rs.core.Responsehandle()Handle information associated with a user code that the end-user input at the verification endpoint in OAuth 2.0 Device Authorization Grant (Device Flow).javax.ws.rs.core.Responsehandle(com.authlete.common.api.Options options)Handle information associated with a user code that the end-user input at the verification endpoint in OAuth 2.0 Device Authorization Grant (Device Flow).protected javax.ws.rs.InternalServerErrorExceptionunexpected(String message, Throwable cause)
-
-
-
Constructor Detail
-
DeviceVerificationRequestHandler
public DeviceVerificationRequestHandler(com.authlete.common.api.AuthleteApi api, DeviceVerificationRequestHandlerSpi spi)Constructor with an implementation ofAuthleteApiinterface and an implementation ofDeviceVerificationRequestHandlerSpiinterface.- Parameters:
api- Implementation ofAuthleteApiinterface.spi- Implementation ofDeviceVerificationRequestHandlerSpiinterface.
-
-
Method Detail
-
handle
public javax.ws.rs.core.Response handle() throws javax.ws.rs.WebApplicationExceptionHandle information associated with a user code that the end-user input at the verification endpoint in OAuth 2.0 Device Authorization Grant (Device Flow). This method is an alias ofhandle(null).- Returns:
- A response that should be returned to the end-user.
- Throws:
javax.ws.rs.WebApplicationException- An error occurred.
-
handle
public javax.ws.rs.core.Response handle(com.authlete.common.api.Options options) throws javax.ws.rs.WebApplicationExceptionHandle information associated with a user code that the end-user input at the verification endpoint in OAuth 2.0 Device Authorization Grant (Device Flow).- Parameters:
options- The request options for the/api/device/verificationAPI.- Returns:
- A response that should be returned to the end-user.
- Throws:
javax.ws.rs.WebApplicationException- An error occurred.- Since:
- 2.82
-
getApiCaller
protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
-
-