Class BaseFederationRegistrationEndpoint


  • public class BaseFederationRegistrationEndpoint
    extends BaseEndpoint
    A base class for the federation registration endpoint of OpenID Connect Federation 1.0.

    An OpenID Provider that supports the "explicit" client registration defined in OpenID Connect Federation 1.0 is supposed to provide a federation registration endpoint that accepts explicit client registration requests.

    The endpoint accepts POST requests whose Content-Type is either of the following.

    1. application/entity-statement+jwt
    2. application/trust-chain+json

    When the Content-Type of a request is application/entity-statement+jwt, the content of the request is the entity configuration of a relying party that is to be registered.

    On the other hand, when the Content-Type of a request is application/trust-chain+json, the content of the request is a JSON array that contains entity statements in JWT format. The sequence of the entity statements composes the trust chain of a relying party that is to be registered.

    On successful registration, the endpoint should return a kind of entity statement (JWT) with the HTTP status code 200 OK and the content type application/jose.

    The discovery document (OpenID Connect Discovery 1.0) should include the federation_registration_endpoint server metadata that denotes the URL of the federation registration endpoint.

    Since:
    2.53, Authlete 2.3
    See Also:
    OpenID Connect Federation 1.0
    • Constructor Detail

      • BaseFederationRegistrationEndpoint

        public BaseFederationRegistrationEndpoint()
    • Method Detail

      • handle

        public javax.ws.rs.core.Response handle​(com.authlete.common.api.AuthleteApi api,
                                                com.authlete.common.dto.FederationRegistrationRequest request)
        Handle a request to the federation registration endpoint.

        This method internally creates a FederationRegistrationRequestHandler instance and calls its handle(FederationRegistrationRequest) method. Then, this method uses the value returned from the handler's method as a response from this method.

        When the handler's method raises a WebApplicationException, this method calls onError(WebApplicationException) 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.
        Returns:
        A response that should be returned from the federation registration endpoint.