Search in sources :

Example 1 with PrincipalBearingPrincipalResolver

use of org.apereo.cas.adaptors.trusted.authentication.principal.PrincipalBearingPrincipalResolver in project cas by apereo.

the class TrustedAuthenticationConfiguration method trustedPrincipalResolver.

@Bean
@RefreshScope
public PrincipalResolver trustedPrincipalResolver() {
    final PrincipalBearingPrincipalResolver r = new PrincipalBearingPrincipalResolver();
    r.setAttributeRepository(this.attributeRepository);
    r.setPrincipalAttributeName(casProperties.getAuthn().getTrusted().getPrincipalAttribute());
    r.setReturnNullIfNoAttributes(casProperties.getAuthn().getTrusted().isReturnNull());
    r.setPrincipalFactory(trustedPrincipalFactory());
    return r;
}
Also used : PrincipalBearingPrincipalResolver(org.apereo.cas.adaptors.trusted.authentication.principal.PrincipalBearingPrincipalResolver) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

PrincipalBearingPrincipalResolver (org.apereo.cas.adaptors.trusted.authentication.principal.PrincipalBearingPrincipalResolver)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1