Package com.authlete.jaxrs
Class DeviceCompleteRequestHandler
- java.lang.Object
-
- com.authlete.jaxrs.DeviceCompleteRequestHandler
-
public class DeviceCompleteRequestHandler extends Object
Handler for processing the result of end-user authentication and authorization in OAuth 2.0 Device Authorization Grant (Device Flow).handle()method should be called after the authorization server receives the result of end-user authentication and authorization, or even in the case where the server gave up getting the result for some reasons. Thehandle()method calls Authlete's/api/device/completeAPI, 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 DeviceCompleteRequestHandler(com.authlete.common.api.AuthleteApi api, DeviceCompleteRequestHandlerSpi spi)Constructor with an implementation ofAuthleteApiinterface and an implementation ofDeviceCompleteRequestHandlerSpiinterface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.authlete.jaxrs.AuthleteApiCallergetApiCaller()javax.ws.rs.core.Responsehandle(String userCode, String[] claimNames)Handle the result of end-user authentication and authorization in OAuth 2.0 Device Authorization Grant (Device Flow).javax.ws.rs.core.Responsehandle(String userCode, String[] claimNames, com.authlete.common.api.Options options)Handle the result of end-user authentication and authorization in OAuth 2.0 Device Authorization Grant (Device Flow).protected javax.ws.rs.InternalServerErrorExceptionunexpected(String message, Throwable cause)
-
-
-
Constructor Detail
-
DeviceCompleteRequestHandler
public DeviceCompleteRequestHandler(com.authlete.common.api.AuthleteApi api, DeviceCompleteRequestHandlerSpi spi)Constructor with an implementation ofAuthleteApiinterface and an implementation ofDeviceCompleteRequestHandlerSpiinterface.- Parameters:
api- Implementation ofAuthleteApiinterface.spi- Implementation ofDeviceCompleteRequestHandlerSpiinterface.
-
-
Method Detail
-
handle
public javax.ws.rs.core.Response handle(String userCode, String[] claimNames) throws javax.ws.rs.WebApplicationException
Handle the result of end-user authentication and authorization in OAuth 2.0 Device Authorization Grant (Device Flow). This method is an alias ofhandle(userCode, claimNames, null).- Parameters:
userCode- The user code that the end-user input.claimNames- Names of requested claims. Use the value of theclaimNamesparameter in a response from Authlete's/api/device/verificationAPI.- 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(String userCode, String[] claimNames, com.authlete.common.api.Options options) throws javax.ws.rs.WebApplicationException
Handle the result of end-user authentication and authorization in OAuth 2.0 Device Authorization Grant (Device Flow).- Parameters:
userCode- The user code that the end-user input.claimNames- Names of requested claims. Use the value of theclaimNamesparameter in a response from Authlete's/api/device/verificationAPI.options- The request options for the/api/client/registrationAPI.- 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()
-
-