Class BaseClientRegistrationEndpoint

    • Constructor Detail

      • BaseClientRegistrationEndpoint

        public BaseClientRegistrationEndpoint()
    • Method Detail

      • handleRegister

        public javax.ws.rs.core.Response handleRegister​(com.authlete.common.api.AuthleteApi api,
                                                        String json,
                                                        String authorization)
        Handle a client registration request.

        This method internally creates a ClientRegistrationRequestHandler instance and calls its ClientRegistrationRequestHandler.handleRegister(String, String) method. Then, this method uses the value returned from the handle() method as a response from this method.

        When ClientRegistrationRequestHandler.handle() method raises a WebApplicationException, this method calls onError() method with the exception. The default implementation of onError() does nothing. You can override the method as necessary. After calling onError() method, this method calls getResponse() method of the exception and uses the returned value as a response from this method.

        Parameters:
        api - An implementation of AuthleteApi.
        json - The serialized JSON body of the client registration 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.
      • handleGet

        public javax.ws.rs.core.Response handleGet​(com.authlete.common.api.AuthleteApi api,
                                                   String clientId,
                                                   String authorization)
        Handle a client registration management get request.

        This method internally creates a ClientRegistrationRequestHandler instance and calls its ClientRegistrationRequestHandler.handleGet(String, String) method. Then, this method uses the value returned from the handle() method as a response from this method.

        When ClientRegistrationRequestHandler.handle() method raises a WebApplicationException, this method calls onError() method with the exception. The default implementation of onError() does nothing. You can override the method as necessary. After calling onError() method, this method calls getResponse() method of the exception and uses the returned value as a response from this method.

        Parameters:
        api - An implementation of AuthleteApi.
        clientId - The client ID as determined by the incoming request. You will commonly parse this from the incoming request URL as a path component. If your Service has its registrationManagementEndpoint property set, Authlete will add the client ID as a path parameter to this URI automatically.
        authorization - The value of Authorization header of the registration request. This is optional.
        Returns:
        A response that should be returned to the client application.
      • handleUpdate

        public javax.ws.rs.core.Response handleUpdate​(com.authlete.common.api.AuthleteApi api,
                                                      String clientId,
                                                      String json,
                                                      String authorization)
        Handle a client registration management update request.

        This method internally creates a ClientRegistrationRequestHandler instance and calls its ClientRegistrationRequestHandler.handleUpdate(String, String, String) method. Then, this method uses the value returned from the handle() method as a response from this method.

        When ClientRegistrationRequestHandler.handle() method raises a WebApplicationException, this method calls onError() method with the exception. The default implementation of onError() does nothing. You can override the method as necessary. After calling onError() method, this method calls getResponse() method of the exception and uses the returned value as a response from this method.

        Parameters:
        api - An implementation of AuthleteApi.
        clientId - The client ID as determined by the incoming request. You will commonly parse this from the incoming request URL as a path component. If your Service has its registrationManagementEndpoint property set, Authlete will add the client ID as a path parameter to this URI automatically.
        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.
      • handleDelete

        public javax.ws.rs.core.Response handleDelete​(com.authlete.common.api.AuthleteApi api,
                                                      String clientId,
                                                      String authorization)
        Handle a client registration management delete request.

        This method internally creates a ClientRegistrationRequestHandler instance and calls its ClientRegistrationRequestHandler.handleDelete(String, String) method. Then, this method uses the value returned from the handle() method as a response from this method.

        When ClientRegistrationRequestHandler.handle() method raises a WebApplicationException, this method calls onError() method with the exception. The default implementation of onError() does nothing. You can override the method as necessary. After calling onError() method, this method calls getResponse() method of the exception and uses the returned value as a response from this method.

        Parameters:
        api - An implementation of AuthleteApi.
        clientId - The client ID as determined by the incoming request. You will commonly parse this from the incoming request URL as a path component. If your Service has its registrationManagementEndpoint property set, Authlete will add the client ID as a path parameter to this URI automatically.
        authorization - The value of Authorization header of the registration request. This is optional.
        Returns:
        A response that should be returned to the client application.