public class X509AuthenticationProvider extends java.lang.Object implements AuthenticationProvider, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware
The request will typically originate from X509ProcessingFilter).
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.context.support.MessageSourceAccessor |
messages
Deprecated.
|
| Constructor and Description |
|---|
X509AuthenticationProvider()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Deprecated.
|
Authentication |
authenticate(Authentication authentication)
Deprecated.
If the supplied authentication token contains a certificate then this will be passed to the configured
X509AuthoritiesPopulator to obtain the user details and authorities for the user identified by the
certificate. |
void |
setMessageSource(org.springframework.context.MessageSource messageSource)
Deprecated.
|
void |
setX509AuthoritiesPopulator(X509AuthoritiesPopulator x509AuthoritiesPopulator)
Deprecated.
|
void |
setX509UserCache(X509UserCache cache)
Deprecated.
|
boolean |
supports(java.lang.Class authentication)
Deprecated.
Returns
true if this AuthenticationProvider supports the indicated
Authentication object. |
protected org.springframework.context.support.MessageSourceAccessor messages
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic Authentication authenticate(Authentication authentication) throws AuthenticationException
X509AuthoritiesPopulator to obtain the user details and authorities for the user identified by the
certificate.If no certificate is present (for example, if the filter is applied to an HttpRequest for which client authentication hasn't been configured in the container) then a BadCredentialsException will be raised.
authenticate in interface AuthenticationProviderauthentication - the authentication request.AuthenticationException - if the X509AuthoritiesPopulator rejects the certficate.BadCredentialsException - if no certificate was presented in the authentication request.public void setMessageSource(org.springframework.context.MessageSource messageSource)
setMessageSource in interface org.springframework.context.MessageSourceAwarepublic void setX509AuthoritiesPopulator(X509AuthoritiesPopulator x509AuthoritiesPopulator)
public void setX509UserCache(X509UserCache cache)
public boolean supports(java.lang.Class authentication)
AuthenticationProvidertrue if this AuthenticationProvider supports the indicated
Authentication object.
Returning true does not guarantee an AuthenticationProvider will be able to
authenticate the presented instance of the Authentication class. It simply indicates it can support
closer evaluation of it. An AuthenticationProvider can still return null from the
AuthenticationProvider.authenticate(Authentication) method to indicate another AuthenticationProvider should be
tried.
Selection of an AuthenticationProvider capable of performing authentication is
conducted at runtime the ProviderManager.
supports in interface AuthenticationProviderauthentication - DOCUMENT ME!true if the implementation can more closely evaluate the Authentication class
presented