use of org.apereo.cas.adaptors.x509.authentication.principal.X509SubjectDNPrincipalResolver in project cas by apereo.
the class X509AuthenticationConfiguration method x509SubjectDNPrincipalResolver.
@Bean
@RefreshScope
public PrincipalResolver x509SubjectDNPrincipalResolver() {
final X509Properties x509 = casProperties.getAuthn().getX509();
final X509SubjectDNPrincipalResolver r = new X509SubjectDNPrincipalResolver();
r.setAttributeRepository(attributeRepository);
r.setPrincipalAttributeName(x509.getPrincipal().getPrincipalAttribute());
r.setReturnNullIfNoAttributes(x509.getPrincipal().isReturnNull());
r.setPrincipalFactory(x509PrincipalFactory());
return r;
}
Aggregations