Class X509AuthenticationProvider

All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware,

public class X509AuthenticationProvider extends Object implements, 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.

$Id: 3256 2008-08-18 18:20:48Z luke_t $
Luke Taylor
  • Field Details

    • messages

      protected messages
  • Constructor Details

    • X509AuthenticationProvider

      public X509AuthenticationProvider()
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • authenticate

      public authenticate( authentication) throws
      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.

      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:
      authenticate in interface
      authentication - the authentication request.
      an X509AuthenticationToken containing the authorities of the principal represented by the certificate.
      Throws: - if the X509AuthoritiesPopulator rejects the certficate. - if no certificate was presented in the authentication request.
    • setMessageSource

      public void setMessageSource(org.springframework.context.MessageSource messageSource)
      Specified by:
      setMessageSource in interface org.springframework.context.MessageSourceAware
    • setX509AuthoritiesPopulator

      public void setX509AuthoritiesPopulator(X509AuthoritiesPopulator x509AuthoritiesPopulator)
    • setX509UserCache

      public void setX509UserCache(X509UserCache cache)
    • supports

      public boolean supports(Class<?> authentication)
      Specified by:
      supports in interface