use of org.apereo.cas.support.saml.mdui.ChainingMetadataResolverAdapter in project cas by apereo.
the class SamlMetadataUIConfiguration method chainingSamlMetadataUIMetadataResolverAdapter.
@ConditionalOnMissingBean(name = "chainingSamlMetadataUIMetadataResolverAdapter")
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
public MetadataResolverAdapter chainingSamlMetadataUIMetadataResolverAdapter(final CasConfigurationProperties casProperties, final ConfigurableApplicationContext applicationContext, @Qualifier(OpenSamlConfigBean.DEFAULT_BEAN_NAME) final OpenSamlConfigBean openSamlConfigBean) {
val staticAdapter = new StaticMetadataResolverAdapter();
configureAdapter(staticAdapter, applicationContext, casProperties, openSamlConfigBean);
staticAdapter.buildMetadataResolverAggregate();
val dynaAdapter = new DynamicMetadataResolverAdapter();
configureAdapter(dynaAdapter, applicationContext, casProperties, openSamlConfigBean);
return new ChainingMetadataResolverAdapter(CollectionUtils.wrapSet(staticAdapter, dynaAdapter));
}
Aggregations