Class ClientRegistrationRequestHandler
- java.lang.Object
-
- com.authlete.jaxrs.ClientRegistrationRequestHandler
-
public class ClientRegistrationRequestHandler extends Object
Handler for requests to the dynamic client registration and dynamic registration management endpoints.In an implementation of client registration endpoint, call
handleRegister(String, String)
method and use the response as the response from the endpoint to the client application. ThehandleRegister()
method calls Authlete's/api/client/registration
API, receives a response from the API, and dispatches processing according to theaction
parameter in the response.In an implementation of client registration management endpoint's GET functionality call
handleGet(String, String)
method and use the response as the response from the endpoint to the client application. ThehandleGet()
method calls Authlete's/api/client/registration/get
API, receives a response from the API, and dispatches processing according to theaction
parameter in the response.In an implementation of client registration management endpoint's PUT functionality call
handleUpdate(String, String, String)
method and use the response as the response from the endpoint to the client application. ThehandleUpdate()
method calls Authlete's/api/client/registration/update
API, receives a response from the API, and dispatches processing according to theaction
parameter in the response.In an implementation of client registration management endpoint's DELETE functionality call
handleDelete(String, String)
method and use the response as the response from the endpoint to the client application. ThehandleDelete()
method calls Authlete's/api/client/registration/delete
API, receives a response from the API, and dispatches processing according to theaction
parameter in the response.- Since:
- 2.17
- See Also:
- RFC 7591, RFC 7592, OpenID Connect Dynamic Client Registration
-
-
Constructor Summary
Constructors Constructor Description ClientRegistrationRequestHandler(com.authlete.common.api.AuthleteApi api)
Constructor with an implementation ofAuthleteApi
interface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.authlete.jaxrs.AuthleteApiCaller
getApiCaller()
javax.ws.rs.core.Response
handleDelete(String clientId, String authorization)
Handle a dynamic client management DELETE request.javax.ws.rs.core.Response
handleGet(String clientId, String authorization)
Handle a dynamic client management GET request.javax.ws.rs.core.Response
handleRegister(String json, String authorization)
Handle a dynamic client registration request.javax.ws.rs.core.Response
handleUpdate(String clientId, String json, String authorization)
Handle a dynamic client management PUT request.protected javax.ws.rs.InternalServerErrorException
unexpected(String message, Throwable cause)
-
-
-
Method Detail
-
handleRegister
public javax.ws.rs.core.Response handleRegister(String json, String authorization)
Handle a dynamic client registration request.- Parameters:
json
- The serialized JSON body of the client registration request.authorization
- The value ofAuthorization
header of the token request. This is optional.- Returns:
- A response that should be returned to the client application.
- Throws:
javax.ws.rs.WebApplicationException
- An error occurred.
-
handleGet
public javax.ws.rs.core.Response handleGet(String clientId, String authorization)
Handle a dynamic client management GET request.- Parameters:
clientId
- The client ID as determined by the incoming request.authorization
- The value ofAuthorization
header of the registration request. This is optional.- Returns:
- A response that should be returned to the client application.
- Throws:
javax.ws.rs.WebApplicationException
- An error occurred.
-
handleUpdate
public javax.ws.rs.core.Response handleUpdate(String clientId, String json, String authorization)
Handle a dynamic client management PUT request.- Parameters:
clientId
- The client ID as determined by the incoming request.json
- The serialized JSON body of the client update request.authorization
- The value ofAuthorization
header of the registration request. This is optional.- Returns:
- A response that should be returned to the client application.
- Throws:
javax.ws.rs.WebApplicationException
- An error occurred.
-
handleDelete
public javax.ws.rs.core.Response handleDelete(String clientId, String authorization)
Handle a dynamic client management DELETE request.- Parameters:
clientId
- The client ID as determined by the incoming request.authorization
- The value ofAuthorization
header of the registration request. This is optional.- Returns:
- A response that should be returned to the client application.
- Throws:
javax.ws.rs.WebApplicationException
- An error occurred.
-
getApiCaller
protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
-
-