public class X509AuthenticationProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider, InitializingBean, MessageSourceAware
Migrated from Spring Security 2 since it has been removed in Spring Security 3.
| Modifier and Type | Field and Description |
|---|---|
protected MessageSourceAccessor |
messages |
| Constructor and Description |
|---|
X509AuthenticationProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication)
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(MessageSource messageSource) |
void |
setX509AuthoritiesPopulator(X509AuthoritiesPopulator x509AuthoritiesPopulator) |
void |
setX509UserCache(X509UserCache cache) |
boolean |
supports(Class<?> authentication) |
protected MessageSourceAccessor messages
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
throws org.springframework.security.core.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 org.springframework.security.authentication.AuthenticationProviderauthentication - the authentication request.org.springframework.security.core.AuthenticationException - if the X509AuthoritiesPopulator rejects the certficate.org.springframework.security.authentication.BadCredentialsException - if no certificate was presented in the authentication request.public void setMessageSource(MessageSource messageSource)
setMessageSource in interface MessageSourceAwarepublic void setX509AuthoritiesPopulator(X509AuthoritiesPopulator x509AuthoritiesPopulator)
public void setX509UserCache(X509UserCache cache)
public boolean supports(Class<?> authentication)
supports in interface org.springframework.security.authentication.AuthenticationProvider