Package org.keycloak.services.x509
Class AbstractClientCertificateFromHttpHeadersLookup
java.lang.Object
org.keycloak.services.x509.AbstractClientCertificateFromHttpHeadersLookup
- All Implemented Interfaces:
Provider
,X509ClientCertificateLookup
- Direct Known Subclasses:
ApacheProxySslClientCertificateLookup
,HaProxySslClientCertificateLookup
,NginxProxySslClientCertificateLookup
,NginxProxyTrustedClientCertificateLookup
public abstract class AbstractClientCertificateFromHttpHeadersLookup
extends Object
implements X509ClientCertificateLookup
- Since:
- 3/29/2017
- Version:
- $Revision: 1 $
- Author:
- Peter Nalyvayko
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAbstractClientCertificateFromHttpHeadersLookup
(String sslCientCertHttpHeader, String sslCertChainHttpHeaderPrefix, int certificateChainLength) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected abstract X509Certificate
getCertificateChain
(HttpRequest httpRequest) Returns a client certificate, and optionally any certificates in the certificate chain.protected X509Certificate
getCertificateFromHttpHeader
(HttpRequest request, String httpHeader)
-
Field Details
-
logger
protected static final org.jboss.logging.Logger logger -
sslClientCertHttpHeader
-
sslCertChainHttpHeaderPrefix
-
certificateChainLength
protected final int certificateChainLength
-
-
Constructor Details
-
AbstractClientCertificateFromHttpHeadersLookup
-
-
Method Details
-
close
public void close() -
decodeCertificateFromPem
- Throws:
PemException
-
getCertificateFromHttpHeader
protected X509Certificate getCertificateFromHttpHeader(HttpRequest request, String httpHeader) throws GeneralSecurityException - Throws:
GeneralSecurityException
-
getCertificateChain
public X509Certificate[] getCertificateChain(HttpRequest httpRequest) throws GeneralSecurityException Description copied from interface:X509ClientCertificateLookup
Returns a client certificate, and optionally any certificates in the certificate chain.- Specified by:
getCertificateChain
in interfaceX509ClientCertificateLookup
- Returns:
- Throws:
GeneralSecurityException
-