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(AuthenticationManager
authenticationManager){
return new X509AuthenticationFilter(){{
setAuthenticationManager(authenticationManager);
}};
}
@Bean
public PreAuthenticatedAuthenticationProvider
preauthAuthenticationProvider(AuthenticationUserDetailsService
authenticationUserDetailsService...