Search in sources :

Example 1 with AbstractMetadataResolverAdapter

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

the class SamlMetadataUIConfiguration method configureAdapter.

private MetadataResolverAdapter configureAdapter(final AbstractMetadataResolverAdapter adapter) {
    final Map<Resource, MetadataFilterChain> resources = new HashMap<>();
    final MetadataFilterChain chain = new MetadataFilterChain();
    casProperties.getSamlMetadataUi().getResources().forEach(Unchecked.consumer(r -> configureResource(resources, chain, r)));
    adapter.setRequireValidMetadata(casProperties.getSamlMetadataUi().isRequireValidMetadata());
    adapter.setMetadataResources(resources);
    adapter.setConfigBean(openSamlConfigBean);
    return adapter;
}
Also used : CasConfigurationProperties(org.apereo.cas.configuration.CasConfigurationProperties) Arrays(java.util.Arrays) SignatureValidationFilter(org.opensaml.saml.metadata.resolver.filter.impl.SignatureValidationFilter) LoggerFactory(org.slf4j.LoggerFactory) StaticMetadataResolverAdapter(org.apereo.cas.support.saml.mdui.StaticMetadataResolverAdapter) Autowired(org.springframework.beans.factory.annotation.Autowired) HashMap(java.util.HashMap) FlowBuilderServices(org.springframework.webflow.engine.builder.support.FlowBuilderServices) StringUtils(org.apache.commons.lang3.StringUtils) RequiredValidUntilFilter(org.opensaml.saml.metadata.resolver.filter.impl.RequiredValidUntilFilter) ArrayList(java.util.ArrayList) WebApplicationService(org.apereo.cas.authentication.principal.WebApplicationService) SamlUtils(org.apereo.cas.support.saml.SamlUtils) EnableConfigurationProperties(org.springframework.boot.context.properties.EnableConfigurationProperties) Map(java.util.Map) Qualifier(org.springframework.beans.factory.annotation.Qualifier) SamlMetadataUIWebflowConfigurer(org.apereo.cas.support.saml.mdui.web.flow.SamlMetadataUIWebflowConfigurer) ServiceFactory(org.apereo.cas.authentication.principal.ServiceFactory) MetadataFilter(org.opensaml.saml.metadata.resolver.filter.MetadataFilter) ServicesManager(org.apereo.cas.services.ServicesManager) Resource(org.springframework.core.io.Resource) MetadataFilterChain(org.opensaml.saml.metadata.resolver.filter.MetadataFilterChain) AbstractMetadataResolverAdapter(org.apereo.cas.support.saml.mdui.AbstractMetadataResolverAdapter) MetadataResolverAdapter(org.apereo.cas.support.saml.mdui.MetadataResolverAdapter) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ResourceUtils(org.apereo.cas.util.ResourceUtils) Unchecked(org.jooq.lambda.Unchecked) Logger(org.slf4j.Logger) ResourceLoader(org.springframework.core.io.ResourceLoader) FlowDefinitionRegistry(org.springframework.webflow.definition.registry.FlowDefinitionRegistry) ChainingMetadataResolverAdapter(org.apereo.cas.support.saml.mdui.ChainingMetadataResolverAdapter) SamlMetadataUIParserAction(org.apereo.cas.support.saml.mdui.web.flow.SamlMetadataUIParserAction) Action(org.springframework.webflow.execution.Action) OpenSamlConfigBean(org.apereo.cas.support.saml.OpenSamlConfigBean) SamlProtocolConstants(org.apereo.cas.support.saml.SamlProtocolConstants) Configuration(org.springframework.context.annotation.Configuration) List(java.util.List) DynamicMetadataResolverAdapter(org.apereo.cas.support.saml.mdui.DynamicMetadataResolverAdapter) CasWebflowConfigurer(org.apereo.cas.web.flow.CasWebflowConfigurer) Bean(org.springframework.context.annotation.Bean) HashMap(java.util.HashMap) Resource(org.springframework.core.io.Resource) MetadataFilterChain(org.opensaml.saml.metadata.resolver.filter.MetadataFilterChain)

Aggregations

ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 StringUtils (org.apache.commons.lang3.StringUtils)1 ServiceFactory (org.apereo.cas.authentication.principal.ServiceFactory)1 WebApplicationService (org.apereo.cas.authentication.principal.WebApplicationService)1 CasConfigurationProperties (org.apereo.cas.configuration.CasConfigurationProperties)1 ServicesManager (org.apereo.cas.services.ServicesManager)1 OpenSamlConfigBean (org.apereo.cas.support.saml.OpenSamlConfigBean)1 SamlProtocolConstants (org.apereo.cas.support.saml.SamlProtocolConstants)1 SamlUtils (org.apereo.cas.support.saml.SamlUtils)1 AbstractMetadataResolverAdapter (org.apereo.cas.support.saml.mdui.AbstractMetadataResolverAdapter)1 ChainingMetadataResolverAdapter (org.apereo.cas.support.saml.mdui.ChainingMetadataResolverAdapter)1 DynamicMetadataResolverAdapter (org.apereo.cas.support.saml.mdui.DynamicMetadataResolverAdapter)1 MetadataResolverAdapter (org.apereo.cas.support.saml.mdui.MetadataResolverAdapter)1 StaticMetadataResolverAdapter (org.apereo.cas.support.saml.mdui.StaticMetadataResolverAdapter)1 SamlMetadataUIParserAction (org.apereo.cas.support.saml.mdui.web.flow.SamlMetadataUIParserAction)1 SamlMetadataUIWebflowConfigurer (org.apereo.cas.support.saml.mdui.web.flow.SamlMetadataUIWebflowConfigurer)1