Package com.authlete.jaxrs
Class DeviceAuthorizationRequestHandler
- java.lang.Object
-
- com.authlete.jaxrs.DeviceAuthorizationRequestHandler
-
public class DeviceAuthorizationRequestHandler extends Object
Handler for device authorization requests in OAuth 2.0 Device Authorization Grant (Device Flow).In an implementation of device authorization endpoint, call
handle(Params)method and use the response as the response from the endpoint to the client application.handle()method calls Authlete's/device/authorizationAPI, receives a response from the API, and dispatches processing according to theactionparameter in the response.- Since:
- 2.18
- Author:
- Hideki Ikeda
- See Also:
- RFC 8628: OAuth 2.0 Device Authorization Grant
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDeviceAuthorizationRequestHandler.ParamsParameters passed to thehandle(Params)method.
-
Constructor Summary
Constructors Constructor Description DeviceAuthorizationRequestHandler(com.authlete.common.api.AuthleteApi api)Constructor with an implementation of theAuthleteApiinterface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.authlete.jaxrs.AuthleteApiCallergetApiCaller()javax.ws.rs.core.Responsehandle(DeviceAuthorizationRequestHandler.Params params)Handle a device authorization request.javax.ws.rs.core.Responsehandle(DeviceAuthorizationRequestHandler.Params params, com.authlete.common.api.Options options)Handle a device authorization request.javax.ws.rs.core.Responsehandle(javax.ws.rs.core.MultivaluedMap<String,String> parameters, String authorization, String[] clientCertificatePath, com.authlete.common.api.Options options)Handler for device authorization requests in OAuth 2.0 Device Authorization Grant (Device Flow).protected javax.ws.rs.InternalServerErrorExceptionunexpected(String message, Throwable cause)
-
-
-
Method Detail
-
handle
public javax.ws.rs.core.Response handle(javax.ws.rs.core.MultivaluedMap<String,String> parameters, String authorization, String[] clientCertificatePath, com.authlete.common.api.Options options) throws javax.ws.rs.WebApplicationException
Handler for device authorization requests in OAuth 2.0 Device Authorization Grant (Device Flow).- Parameters:
parameters- Request parameters of a device authorization request.authorization- The value ofAuthorizationheader in the device authorization request. A client application may embed its pair of client ID and client secret in a device authorization request using Basic Authentication.clientCertificatePath- The path of the client's certificate, each in PEM format. The first item in the array is the client's certificate itself. May benullif the client did not send a certificate or path.options- The request options for the device authorization request.- Returns:
- A response that should be returned from the endpoint to the client application.
- Throws:
javax.ws.rs.WebApplicationException- An error occurred.
-
handle
public javax.ws.rs.core.Response handle(DeviceAuthorizationRequestHandler.Params params)
Handle a device authorization request.- Parameters:
params- Parameters for Authlete's/device/authorizationAPI.- Returns:
- A response that should be returned from the endpoint to the client application.
- Since:
- 2.79
-
handle
public javax.ws.rs.core.Response handle(DeviceAuthorizationRequestHandler.Params params, com.authlete.common.api.Options options)
Handle a device authorization request.- Parameters:
params- The request parameters for Authlete's/device/authorizationAPI.options- The request options for Authlete's/device/authorizationAPI.- Returns:
- A response that should be returned from the endpoint to the client application.
- Since:
- 2.79
-
getApiCaller
protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
-
-