Search in sources :

Example 1 with DynamicMetadataResolverAdapter

use of org.apereo.cas.support.saml.mdui.DynamicMetadataResolverAdapter 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));
}
Also used : lombok.val(lombok.val) ChainingMetadataResolverAdapter(org.apereo.cas.support.saml.mdui.ChainingMetadataResolverAdapter) DynamicMetadataResolverAdapter(org.apereo.cas.support.saml.mdui.DynamicMetadataResolverAdapter) StaticMetadataResolverAdapter(org.apereo.cas.support.saml.mdui.StaticMetadataResolverAdapter) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) OpenSamlConfigBean(org.apereo.cas.support.saml.OpenSamlConfigBean) Bean(org.springframework.context.annotation.Bean)

Example 2 with DynamicMetadataResolverAdapter

use of org.apereo.cas.support.saml.mdui.DynamicMetadataResolverAdapter in project cas by apereo.

the class SamlMetadataUIConfiguration method getDynamicMetadataResolverAdapter.

private MetadataResolverAdapter getDynamicMetadataResolverAdapter() {
    final DynamicMetadataResolverAdapter adapter = new DynamicMetadataResolverAdapter();
    configureAdapter(adapter);
    return adapter;
}
Also used : DynamicMetadataResolverAdapter(org.apereo.cas.support.saml.mdui.DynamicMetadataResolverAdapter)

Aggregations

DynamicMetadataResolverAdapter (org.apereo.cas.support.saml.mdui.DynamicMetadataResolverAdapter)2 lombok.val (lombok.val)1 OpenSamlConfigBean (org.apereo.cas.support.saml.OpenSamlConfigBean)1 ChainingMetadataResolverAdapter (org.apereo.cas.support.saml.mdui.ChainingMetadataResolverAdapter)1 StaticMetadataResolverAdapter (org.apereo.cas.support.saml.mdui.StaticMetadataResolverAdapter)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