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
Fields Modifier and Type Field Description protected int
certificateChainLength
protected static org.jboss.logging.Logger
logger
protected String
sslCertChainHttpHeaderPrefix
protected String
sslClientCertHttpHeader
-
Constructor Summary
Constructors Constructor Description AbstractClientCertificateFromHttpHeadersLookup(String sslCientCertHttpHeader, String sslCertChainHttpHeaderPrefix, int certificateChainLength)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
protected abstract X509Certificate
decodeCertificateFromPem(String pem)
X509Certificate[]
getCertificateChain(HttpRequest httpRequest)
Returns a client certificate, and optionally any certificates in the certificate chain.protected X509Certificate
getCertificateFromHttpHeader(HttpRequest request, String httpHeader)
-
-
-
Method Detail
-
decodeCertificateFromPem
protected abstract X509Certificate decodeCertificateFromPem(String pem) throws PemException
- 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
-
-