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/registrationAPI, receives a response from the API, and dispatches processing according to theactionparameter 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/getAPI, receives a response from the API, and dispatches processing according to theactionparameter 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/updateAPI, receives a response from the API, and dispatches processing according to theactionparameter 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/deleteAPI, receives a response from the API, and dispatches processing according to theactionparameter 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 ofAuthleteApiinterface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.authlete.jaxrs.AuthleteApiCallergetApiCaller()javax.ws.rs.core.ResponsehandleDelete(String clientId, String authorization)Handle a dynamic client management DELETE request.javax.ws.rs.core.ResponsehandleDelete(String clientId, String authorization, com.authlete.common.api.Options options)Handle a dynamic client management DELETE request.javax.ws.rs.core.ResponsehandleGet(String clientId, String authorization)Handle a dynamic client management GET request.javax.ws.rs.core.ResponsehandleGet(String clientId, String authorization, com.authlete.common.api.Options options)Handle a dynamic client management GET request.javax.ws.rs.core.ResponsehandleRegister(String json, String authorization)Handle a dynamic client registration request.javax.ws.rs.core.ResponsehandleRegister(String json, String authorization, com.authlete.common.api.Options options)Handle a dynamic client registration request.javax.ws.rs.core.ResponsehandleUpdate(String clientId, String json, String authorization)Handle a dynamic client management PUT request.javax.ws.rs.core.ResponsehandleUpdate(String clientId, String json, String authorization, com.authlete.common.api.Options options)Handle a dynamic client management PUT request.protected javax.ws.rs.InternalServerErrorExceptionunexpected(String message, Throwable cause)
-
-
-
Method Detail
-
handleRegister
public javax.ws.rs.core.Response handleRegister(String json, String authorization)
Handle a dynamic client registration request. This method is an alias ofhandleRegister(json, authorization, null).- Parameters:
json- The serialized JSON body of the client registration request.authorization- The value ofAuthorizationheader 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.
-
handleRegister
public javax.ws.rs.core.Response handleRegister(String json, String authorization, com.authlete.common.api.Options options)
Handle a dynamic client registration request.- Parameters:
json- The serialized JSON body of the client registration request.authorization- The value ofAuthorizationheader of the token request. This is optional.options- The request options for the/api/client/registrationAPI.- Returns:
- A response that should be returned to the client application.
- Throws:
javax.ws.rs.WebApplicationException- An error occurred.- Since:
- 2.82
-
handleGet
public javax.ws.rs.core.Response handleGet(String clientId, String authorization)
Handle a dynamic client management GET request. This method is an alias of thehandleGet(clientId, authorization, null).- Parameters:
clientId- The client ID as determined by the incoming request.authorization- The value ofAuthorizationheader 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.
-
handleGet
public javax.ws.rs.core.Response handleGet(String clientId, String authorization, com.authlete.common.api.Options options)
Handle a dynamic client management GET request.- Parameters:
clientId- The client ID as determined by the incoming request.authorization- The value ofAuthorizationheader of the registration request. This is optional.options- The request options for the/api/client/registrationAPI.- Returns:
- A response that should be returned to the client application.
- Throws:
javax.ws.rs.WebApplicationException- An error occurred.- Since:
- 2.82
-
handleUpdate
public javax.ws.rs.core.Response handleUpdate(String clientId, String json, String authorization)
Handle a dynamic client management PUT request. This method is an alias ofhandleUpdate(clientId, json, authorization, null).- Parameters:
clientId- The client ID as determined by the incoming request.json- The serialized JSON body of the client update request.authorization- The value ofAuthorizationheader 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, com.authlete.common.api.Options options)
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 ofAuthorizationheader of the registration request. This is optional.options- The request options for the/api/client/registrationAPI.- Returns:
- A response that should be returned to the client application.
- Throws:
javax.ws.rs.WebApplicationException- An error occurred.- Since:
- 2.82
-
handleDelete
public javax.ws.rs.core.Response handleDelete(String clientId, String authorization)
Handle a dynamic client management DELETE request. This method is an alias ofhandleDelete(clientId, authorization, null).- Parameters:
clientId- The client ID as determined by the incoming request.authorization- The value ofAuthorizationheader 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, com.authlete.common.api.Options options)
Handle a dynamic client management DELETE request.- Parameters:
clientId- The client ID as determined by the incoming request.authorization- The value ofAuthorizationheader of the registration request. This is optional.options- The request options for the/api/client/registrationAPI.- Returns:
- A response that should be returned to the client application.
- Throws:
javax.ws.rs.WebApplicationException- An error occurred.- Since:
- 2.82
-
getApiCaller
protected com.authlete.jaxrs.AuthleteApiCaller getApiCaller()
-
-