Class X509AuthenticationProvider
java.lang.Object
org.springframework.ws.soap.security.x509.X509AuthenticationProvider
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.MessageSourceAware,org.springframework.security.authentication.AuthenticationProvider
public class X509AuthenticationProvider
extends Object
implements org.springframework.security.authentication.AuthenticationProvider, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware
Processes an X.509 authentication request.
Migrated from Spring Security 2 since it has been removed in Spring Security 3.
- Version:
- $Id: X509AuthenticationProvider.java 3256 2008-08-18 18:20:48Z luke_t $
- Author:
- Luke Taylor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.support.MessageSourceAccessor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication) If the supplied authentication token contains a certificate then this will be passed to the configuredX509AuthoritiesPopulatorto obtain the user details and authorities for the user identified by the certificate.voidsetMessageSource(org.springframework.context.MessageSource messageSource) voidsetX509AuthoritiesPopulator(X509AuthoritiesPopulator x509AuthoritiesPopulator) voidsetX509UserCache(X509UserCache cache) boolean
-
Field Details
-
messages
protected org.springframework.context.support.MessageSourceAccessor messages
-
-
Constructor Details
-
X509AuthenticationProvider
public X509AuthenticationProvider()
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException If the supplied authentication token contains a certificate then this will be passed to the configuredX509AuthoritiesPopulatorto 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.
- Specified by:
authenticatein interfaceorg.springframework.security.authentication.AuthenticationProvider- Parameters:
authentication- the authentication request.- Returns:
- an X509AuthenticationToken containing the authorities of the principal represented by the certificate.
- Throws:
org.springframework.security.core.AuthenticationException- if theX509AuthoritiesPopulatorrejects the certficate.org.springframework.security.authentication.BadCredentialsException- if no certificate was presented in the authentication request.
-
setMessageSource
public void setMessageSource(org.springframework.context.MessageSource messageSource) - Specified by:
setMessageSourcein interfaceorg.springframework.context.MessageSourceAware
-
setX509AuthoritiesPopulator
-
setX509UserCache
-
supports
- Specified by:
supportsin interfaceorg.springframework.security.authentication.AuthenticationProvider
-