use of org.apereo.services.persondir.support.GroovyPersonAttributeDao in project cas by apereo.
the class CasPersonDirectoryConfiguration method groovyAttributeRepositories.
@ConditionalOnMissingBean(name = "groovyAttributeRepositories")
@Bean
@RefreshScope
public List<IPersonAttributeDao> groovyAttributeRepositories() {
final List<IPersonAttributeDao> list = new ArrayList<>();
casProperties.getAuthn().getAttributeRepository().getGroovy().forEach(groovy -> {
if (groovy.getConfig().getLocation() != null) {
final GroovyPersonAttributeDao dao = new GroovyPersonAttributeDao(new InternalGroovyScriptDao(applicationContext, casProperties));
dao.setCaseInsensitiveUsername(groovy.isCaseInsensitive());
dao.setOrder(groovy.getOrder());
LOGGER.debug("Configured Groovy attribute sources from [{}]", groovy.getConfig().getLocation());
list.add(dao);
}
});
return list;
}
Aggregations