Configuring client certificate authentication using Spring beans
Earlier in this chapter, we reviewed the flow of the classes involved in client certificate authentication. As such, it should be straightforward for us to configure the JBCP calendar using explicit beans. By using the explicit configuration, we will have additional configuration options at our disposal. Let’s take a look and see how to use explicit configuration:
//src/main/java/com/packtpub/springsecurity/configuration/SecurityConfig.java @Bean public X509AuthenticationFilter x509Filter(){ return new X509AuthenticationFilter(){{ setAuthenticationManager(authenticationManager); }}; } @Bean public PreAuthenticatedAuthenticationProvider preAuthAuthenticationProvider(final AuthenticationUserDetailsService authenticationUserDetailsService){ return new PreAuthenticatedAuthenticationProvider(){...