Search in sources :

Example 1 with OpenIdPrincipalResolver

use of org.apereo.cas.support.openid.authentication.principal.OpenIdPrincipalResolver in project cas by apereo.

the class OpenIdAuthenticationEventExecutionPlanConfiguration method openIdPrincipalResolver.

@Bean
public OpenIdPrincipalResolver openIdPrincipalResolver() {
    final OpenIdPrincipalResolver r = new OpenIdPrincipalResolver();
    r.setAttributeRepository(attributeRepository);
    r.setPrincipalAttributeName(casProperties.getAuthn().getOpenid().getPrincipal().getPrincipalAttribute());
    r.setReturnNullIfNoAttributes(casProperties.getAuthn().getOpenid().getPrincipal().isReturnNull());
    r.setPrincipalFactory(openidPrincipalFactory());
    return r;
}
Also used : OpenIdPrincipalResolver(org.apereo.cas.support.openid.authentication.principal.OpenIdPrincipalResolver) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

OpenIdPrincipalResolver (org.apereo.cas.support.openid.authentication.principal.OpenIdPrincipalResolver)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 Bean (org.springframework.context.annotation.Bean)1