Search in sources :

Example 1 with GrouperPrincipalAttributesProperties

use of org.apereo.cas.configuration.model.core.authentication.GrouperPrincipalAttributesProperties in project cas by apereo.

the class CasPersonDirectoryConfiguration method grouperAttributeRepositories.

@ConditionalOnMissingBean(name = "grouperAttributeRepositories")
@Bean
@RefreshScope
public List<IPersonAttributeDao> grouperAttributeRepositories() {
    final List<IPersonAttributeDao> list = new ArrayList<>();
    final GrouperPrincipalAttributesProperties gp = casProperties.getAuthn().getAttributeRepository().getGrouper();
    if (gp.isEnabled()) {
        final GrouperPersonAttributeDao dao = new GrouperPersonAttributeDao();
        dao.setOrder(gp.getOrder());
        LOGGER.debug("Configured Grouper attribute source");
        list.add(dao);
    }
    return list;
}
Also used : GrouperPersonAttributeDao(org.apereo.services.persondir.support.GrouperPersonAttributeDao) IPersonAttributeDao(org.apereo.services.persondir.IPersonAttributeDao) ArrayList(java.util.ArrayList) GrouperPrincipalAttributesProperties(org.apereo.cas.configuration.model.core.authentication.GrouperPrincipalAttributesProperties) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

ArrayList (java.util.ArrayList)1 GrouperPrincipalAttributesProperties (org.apereo.cas.configuration.model.core.authentication.GrouperPrincipalAttributesProperties)1 IPersonAttributeDao (org.apereo.services.persondir.IPersonAttributeDao)1 GrouperPersonAttributeDao (org.apereo.services.persondir.support.GrouperPersonAttributeDao)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