Class BaseEndpoint

    • Constructor Detail

      • BaseEndpoint

        public BaseEndpoint()
    • Method Detail

      • onError

        protected void onError​(javax.ws.rs.WebApplicationException exception)
        Called when the internal request handler raises an exception. The default implementation of this method does nothing. Override this method as necessary.
        Parameters:
        exception - An exception thrown by the internal request handler.
      • extractClientCertificateChain

        protected String[] extractClientCertificateChain​(javax.servlet.http.HttpServletRequest request)
        Utility method for extracting a single client certificate from the default certificate extractors. First checks the request itself for an attached certificate using javax.servlet.request.X509Certificate, then checks the incoming request headers for reverse-proxied certificates using default headers.
        Parameters:
        request - The incoming HTTP request to search for the client's certificate.
        Returns:
        The client's mutual TLS certificate.
        Since:
        2.8
        See Also:
        ClientCertificateExtractor
      • extractClientCertificate

        protected String extractClientCertificate​(javax.servlet.http.HttpServletRequest request)
        Utility method for extracting a single client certificate from the default certificate extractors. Calls extractClientCertificateChain and returns the first entry in the array, if any, null otherwise.
        Parameters:
        request - The incoming HTTP request to search for the client's certificate.
        Returns:
        The client's mutual TLS certificate.
        Since:
        2.8
      • takeAttribute

        protected Object takeAttribute​(javax.servlet.http.HttpSession session,
                                       String key)
        Get the value of an attribute from the given session and remove the attribute from the session after the retrieval.
        Parameters:
        session - The session from which the value of the attribute is extracted.
        key - The key associated with the target attribute.
        Returns:
        The value of the attribute associated with the given key.
        Since:
        2.18