use of org.springframework.security.web.authentication.preauth.x509.X509AuthenticationFilter in project spring-security by spring-projects.
the class X509Configurer method getFilter.
private X509AuthenticationFilter getFilter(AuthenticationManager authenticationManager) {
if (x509AuthenticationFilter == null) {
x509AuthenticationFilter = new X509AuthenticationFilter();
x509AuthenticationFilter.setAuthenticationManager(authenticationManager);
if (subjectPrincipalRegex != null) {
SubjectDnX509PrincipalExtractor principalExtractor = new SubjectDnX509PrincipalExtractor();
principalExtractor.setSubjectDnRegex(subjectPrincipalRegex);
x509AuthenticationFilter.setPrincipalExtractor(principalExtractor);
}
if (authenticationDetailsSource != null) {
x509AuthenticationFilter.setAuthenticationDetailsSource(authenticationDetailsSource);
}
x509AuthenticationFilter = postProcess(x509AuthenticationFilter);
}
return x509AuthenticationFilter;
}
use of org.springframework.security.web.authentication.preauth.x509.X509AuthenticationFilter in project spring-security by spring-projects.
the class X509Configurer method configure.
// @formatter:on
@Override
public void configure(H http) throws Exception {
X509AuthenticationFilter filter = getFilter(http.getSharedObject(AuthenticationManager.class));
http.addFilter(filter);
}
Aggregations