Search in sources :

Example 1 with GrouperPersonAttributeDao

use of org.apereo.services.persondir.support.GrouperPersonAttributeDao 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 PrincipalAttributesProperties.Grouper 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) PrincipalAttributesProperties(org.apereo.cas.configuration.model.core.authentication.PrincipalAttributesProperties) 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 PrincipalAttributesProperties (org.apereo.cas.configuration.model.core.authentication.PrincipalAttributesProperties)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