use of org.apereo.services.persondir.support.JsonBackedComplexStubPersonAttributeDao in project cas by apereo.
the class CasPersonDirectoryConfiguration method jsonAttributeRepositories.
@ConditionalOnMissingBean(name = "jsonAttributeRepositories")
@Bean
@RefreshScope
public List<IPersonAttributeDao> jsonAttributeRepositories() {
final List<IPersonAttributeDao> list = new ArrayList<>();
casProperties.getAuthn().getAttributeRepository().getJson().forEach(json -> {
final Resource r = json.getConfig().getLocation();
if (r != null) {
final JsonBackedComplexStubPersonAttributeDao dao = new JsonBackedComplexStubPersonAttributeDao(r);
dao.setOrder(json.getOrder());
LOGGER.debug("Configured JSON attribute sources from [[{}]]", r);
list.add(dao);
}
});
return list;
}
Aggregations