use of org.apereo.cas.support.spnego.authentication.principal.SpnegoPrincipalResolver in project cas by apereo.
the class SpnegoConfiguration method spnegoPrincipalResolver.
@Bean
@RefreshScope
public PrincipalResolver spnegoPrincipalResolver() {
final SpnegoProperties spnegoProperties = casProperties.getAuthn().getSpnego();
final SpnegoPrincipalResolver r = new SpnegoPrincipalResolver();
r.setPrincipalNameTransformer(Beans.newPrincipalNameTransformer(spnegoProperties.getPrincipalTransformation()));
r.setAttributeRepository(attributeRepository);
r.setPrincipalAttributeName(spnegoProperties.getPrincipal().getPrincipalAttribute());
r.setReturnNullIfNoAttributes(spnegoProperties.getPrincipal().isReturnNull());
r.setPrincipalFactory(spnegoPrincipalFactory());
return r;
}
Aggregations