Package com.authlete.jaxrs
Class PushedAuthReqHandler
- java.lang.Object
-
- com.authlete.jaxrs.PushedAuthReqHandler
-
public class PushedAuthReqHandler extends Object
Handler for pushed authorization request endpoint requests.In an implementation of the pushed authorization request endpoint, call
handle(Params)method and use the response as the response from the endpoint to the client application. Thehandle()method calls Authlete's/pushed_auth_reqAPI, receives a response from the API, and dispatches processing according to theactionparameter in the response.- Since:
- 2.21
- Author:
- Justin Richer
- See Also:
- RFC 9126: OAuth 2.0 Pushed Authorization Requests
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPushedAuthReqHandler.ParamsParameters passed to thehandle(Params)method.
-
Constructor Summary
Constructors Constructor Description PushedAuthReqHandler(com.authlete.common.api.AuthleteApi api)Constructor with an implementation ofAuthleteApiinterface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.authlete.jaxrs.AuthleteApiCallergetApiCaller()javax.ws.rs.core.Responsehandle(PushedAuthReqHandler.Params params)Handle a PAR request.javax.ws.rs.core.Responsehandle(PushedAuthReqHandler.Params params, com.authlete.common.api.Options options)Handle a PAR request.javax.ws.rs.core.Responsehandle(javax.ws.rs.core.MultivaluedMap<String,String> parameters, String authorization, String[] clientCertificatePath)Handle a pushed 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)Handle a pushed authorization request.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) throws javax.ws.rs.WebApplicationException
Handle a pushed authorization request. This method is an alias ofhandle(parameters, authorization, clientCertificatePath, null).- Parameters:
parameters- The request parameters of a pushed authorization request.authorization- The value ofAuthorizationheader in the pushed authorization request. A client application may embed its pair of client ID and client secret in a pushed 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.- 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(javax.ws.rs.core.MultivaluedMap<String,String> parameters, String authorization, String[] clientCertificatePath, com.authlete.common.api.Options options) throws javax.ws.rs.WebApplicationException
Handle a pushed authorization request.- Parameters:
parameters- Request parameters of a pushed authorization request.authorization- The value ofAuthorizationheader in the pushed authorization request. A client application may embed its pair of client ID and client secret in a pushed 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/api/pushed_auth_reqAPI.- Returns:
- A response that should be returned from the endpoint to the client application.
- Throws:
javax.ws.rs.WebApplicationException- An error occurred.- Since:
- 2.82
-
handle
public javax.ws.rs.core.Response handle(PushedAuthReqHandler.Params params)
Handle a PAR request.- Parameters:
params- Parameters needed to handle the PAR request. Must not benull.- Returns:
- A response that should be returned from the endpoint to the client application.
- Throws:
javax.ws.rs.WebApplicationException- An error occurred.- Since:
- 2.69
-
handle
public javax.ws.rs.core.Response handle(PushedAuthReqHandler.Params params, com.authlete.common.api.Options options)
Handle a PAR request.- Parameters:
params- Parameters needed to handle the PAR request. Must not benull.options- The request options for the/api/pushed_auth_reqAPI.- Returns:
- A response that should be returned from the endpoint to the client application.
- Throws:
javax.ws.rs.WebApplicationException- An error occurred.- Since:
- 2.82
-
getApiCaller
protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
-
-