@Override
    protected Credential constructCredentialsFromRequest(final RequestContext context) {
        val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context);
        if (context.getRequestScope().contains(REQUEST_ATTRIBUTE_X509_ERROR)) {
            LOGGER.debug("Not getting certificates from header because error found in the request.");
            return null;
        }

        val x509Credential = super.constructCredentialsFromRequest(context);
        if (x509Credential != null) {
            return x509Credential;
        }
        if (x509CertificateExtractor != null) {
            val certFromHeader = x509CertificateExtractor.extract(request);
            if (certFromHeader != null) {
                LOGGER.debug("Certificate found in HTTP request via [{}]", x509CertificateExtractor.getClass().getName());
                return new X509CertificateCredential(certFromHeader);
            }
            LOGGER.debug("Certificates not found in request header.");
        } else {
            LOGGER.trace("No certificate extractor was configured");
        }
        return null;
    }
Concrete implementation of AbstractNonInteractiveCredentialsAction that
obtains the X509 Certificates from the HttpServletRequest and places them in
the X509CertificateCredential.

@author Scott Battaglia
@since 3.0.0
support/cas-server-support-x509-webflow/src/main/java/org/apereo/cas/web/flow/X509CertificateCredentialsRequestHeaderAction.java