public class SpringCertificateValidationCallbackHandler extends AbstractCallbackHandler implements org.springframework.beans.factory.InitializingBean
AuthenticationManager
. Logic based on
Spring Security's X509ProcessingFilter
.
Spring Security X509AuthenticationToken
is created with the certificate as the credentials.
The configured authentication manager is expected to supply a provider which can handle this token (usually an
instance of X509AuthenticationProvider
).
This class only handles CertificateValidationCallback
s, and throws an UnsupportedCallbackException
for others.
X509AuthenticationToken
,
X509AuthenticationProvider
,
CertificateValidationCallback
logger
Constructor and Description |
---|
SpringCertificateValidationCallbackHandler() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected void |
handleInternal(Callback callback)
Handles
CertificateValidationCallback s, and throws an UnsupportedCallbackException for others |
void |
setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager)
Sets the Spring Security authentication manager.
|
void |
setIgnoreFailure(boolean ignoreFailure) |
handle
public SpringCertificateValidationCallbackHandler()
public void setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager)
public void setIgnoreFailure(boolean ignoreFailure)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
protected void handleInternal(Callback callback) throws IOException, UnsupportedCallbackException
CertificateValidationCallback
s, and throws an UnsupportedCallbackException
for othershandleInternal
in class AbstractCallbackHandler
UnsupportedCallbackException
- when the callback is not supportedIOException
Copyright © 2021 Pivotal Software. All rights reserved.