Class 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. The handleRegister() method calls Authlete's /api/client/registration API, receives a response from the API, and dispatches processing according to the action 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. The handleGet() method calls Authlete's /api/client/registration/get API, receives a response from the API, and dispatches processing according to the action 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. The handleUpdate() method calls Authlete's /api/client/registration/update API, receives a response from the API, and dispatches processing according to the action 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. The handleDelete() method calls Authlete's /api/client/registration/delete API, receives a response from the API, and dispatches processing according to the action parameter in the response.

    Since:
    2.17
    See Also:
    RFC 7591, RFC 7592, OpenID Connect Dynamic Client Registration
    • Constructor Detail

      • ClientRegistrationRequestHandler

        public ClientRegistrationRequestHandler​(com.authlete.common.api.AuthleteApi api)
        Constructor with an implementation of AuthleteApi interface.
        Parameters:
        api - Implementation of AuthleteApi interface.
    • 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 of Authorization 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 of Authorization 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 of Authorization 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 of Authorization 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()
      • unexpected

        protected javax.ws.rs.InternalServerErrorException unexpected​(String message,
                                                                      Throwable cause)