use of org.apereo.cas.support.saml.services.idp.metadata.cache.resolver.UrlResourceMetadataResolver in project cas by apereo.
the class SamlIdPMetadataConfiguration method samlRegisteredServiceMetadataResolvers.
@ConditionalOnMissingBean(name = "samlRegisteredServiceMetadataResolvers")
@Bean
public SamlRegisteredServiceMetadataResolutionPlan samlRegisteredServiceMetadataResolvers() {
final DefaultSamlRegisteredServiceMetadataResolutionPlan plan = new DefaultSamlRegisteredServiceMetadataResolutionPlan();
final SamlIdPProperties samlIdp = casProperties.getAuthn().getSamlIdp();
plan.registerMetadataResolver(new DynamicMetadataResolver(samlIdp, openSamlConfigBean, httpClient));
plan.registerMetadataResolver(new FileSystemResourceMetadataResolver(samlIdp, openSamlConfigBean));
plan.registerMetadataResolver(new UrlResourceMetadataResolver(samlIdp, openSamlConfigBean, httpClient));
plan.registerMetadataResolver(new ClasspathResourceMetadataResolver(samlIdp, openSamlConfigBean));
plan.registerMetadataResolver(new GroovyResourceMetadataResolver(samlIdp, openSamlConfigBean));
final Map<String, SamlRegisteredServiceMetadataResolutionPlanConfigurator> configurers = this.applicationContext.getBeansOfType(SamlRegisteredServiceMetadataResolutionPlanConfigurator.class, false, true);
configurers.values().forEach(c -> {
final String name = StringUtils.removePattern(c.getClass().getSimpleName(), "\\$.+");
LOGGER.debug("Configuring saml metadata resolution plan [{}]", name);
c.configureMetadataResolutionPlan(plan);
});
return plan;
}
Aggregations