private static MetadataResolverAdapter configureAdapter(
        final AbstractMetadataResolverAdapter adapter,
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties,
        final OpenSamlConfigBean openSamlConfigBean) {
        val resources = new HashMap<Resource, MetadataFilterChain>();
        val chain = new MetadataFilterChain();
        casProperties.getSamlMetadataUi().getResources()
            .forEach(Unchecked.consumer(r -> configureResource(applicationContext, resources, chain, r, casProperties)));
        adapter.setRequireValidMetadata(casProperties.getSamlMetadataUi().isRequireValidMetadata());
        adapter.setMetadataResources(resources);
        adapter.setConfigBean(openSamlConfigBean);
        return adapter;
    }
This is {@link SamlMetadataUIConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-saml-mdui/src/main/java/org/apereo/cas/config/SamlMetadataUIConfiguration.java