use of org.springframework.security.web.authentication.preauth.x509.SubjectDnX509PrincipalExtractor 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.SubjectDnX509PrincipalExtractor in project spring-security by spring-projects.
the class SubjectDnX509PrincipalExtractorTests method setUp.
@Before
public void setUp() {
extractor = new SubjectDnX509PrincipalExtractor();
extractor.setMessageSource(new SpringSecurityMessageSource());
}
Aggregations