Class CertificateUtils


  • public class CertificateUtils
    extends Object
    Utilities for certificates.
    Since:
    2.32
    • Constructor Detail

      • CertificateUtils

        public CertificateUtils()
    • Method Detail

      • extractChain

        public static String[] extractChain​(javax.servlet.http.HttpServletRequest request)
        Extract a client certificate chain from an HTTP request using known implementations of ClientCertificateExtractor.
        Parameters:
        request - An HTTP request.
        Returns:
        A client certificate chain. If a non-null value is returned, the first element is a client certificate.
      • extractChain

        public static String[] extractChain​(List<ClientCertificateExtractor> extractors,
                                            javax.servlet.http.HttpServletRequest request)
        Extract a client certificate chain from an HTTP request using the given list of ClientCertificateExtractor implementations.
        Parameters:
        extractors - A list of ClientCertificateExtractor implementations.
        request - An HTTP request.
        Returns:
        A client certificate chain. If a non-null value is returned, the first element is a client certificate.
      • extract

        public static String extract​(javax.servlet.http.HttpServletRequest request)
        Extract a client certificate from an HTTP request using known implementations of ClientCertificateExtractor.
        Parameters:
        request - An HTTP request.
        Returns:
        A client certificate.