Package com.authlete.jaxrs
Class BaseDeviceCompleteEndpoint
- java.lang.Object
-
- com.authlete.jaxrs.BaseEndpoint
-
- com.authlete.jaxrs.BaseDeviceCompleteEndpoint
-
public class BaseDeviceCompleteEndpoint extends BaseEndpoint
A base class for device complete endpoints of OAuth 2.0 Device Authorization Grant (Device Flow).- Since:
- 2.18
- Author:
- Hideki Ikeda
-
-
Constructor Summary
Constructors Constructor Description BaseDeviceCompleteEndpoint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
handle(com.authlete.common.api.AuthleteApi api, DeviceCompleteRequestHandlerSpi spi, String userCode, String[] claimNames)
Handle a device complete request.-
Methods inherited from class com.authlete.jaxrs.BaseEndpoint
extractClientCertificate, extractClientCertificateChain, extractHeadersAsPairs, onError, takeAttribute
-
-
-
-
Method Detail
-
handle
public javax.ws.rs.core.Response handle(com.authlete.common.api.AuthleteApi api, DeviceCompleteRequestHandlerSpi spi, String userCode, String[] claimNames)
Handle a device complete request.This method internally creates a
DeviceCompleteRequestHandler
instance and calls itsDeviceCompleteRequestHandler.handle(String, String[])
method. Then, this method uses the value returned from thehandle()
method as a response from this method.When
DeviceCompleteRequestHandler.handle()
method raises aWebApplicationException
, this method callsonError()
method with the exception. The default implementation ofonError()
does nothing. You can override the method as necessary. After callingonError()
method, this method callsgetResponse()
method of the exception and uses the returned value as a response from this method.- Parameters:
api
- An implementation ofAuthleteApi
.spi
- An implementation ofDeviceCompleteRequestHandlerSpi
.userCode
- The user code that the end-user input.claimNames
- Names of requested claims. Use the value of theclaimNames
parameter in a response from Authlete's/api/device/verification
API.- Returns:
- A response that should be returned to the end-user.
-
-