@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @ConditionalOnMissingBean(name = "delegatedAuthenticationDynamicDiscoveryProviderLocator")
    public DelegatedAuthenticationDynamicDiscoveryProviderLocator delegatedAuthenticationDynamicDiscoveryProviderLocator(
        @Qualifier("clientPrincipalFactory")
        final PrincipalFactory clientPrincipalFactory,
        @Qualifier(PrincipalResolver.BEAN_NAME_PRINCIPAL_RESOLVER)
        final PrincipalResolver defaultPrincipalResolver,
        final ConfigurableApplicationContext applicationContext,
        @Qualifier(DelegatedClientAuthenticationConfigurationContext.BEAN_NAME)
        final DelegatedClientAuthenticationConfigurationContext configContext,
        final CasConfigurationProperties casProperties) {

        return BeanSupplier.of(DelegatedAuthenticationDynamicDiscoveryProviderLocator.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .and(CONDITION_JSON.given(applicationContext.getEnvironment()))
            .supply(() -> new DefaultDelegatedAuthenticationDynamicDiscoveryProviderLocator(
                configContext.getDelegatedClientIdentityProvidersProducer(), configContext.getIdentityProviders(),
                defaultPrincipalResolver, clientPrincipalFactory, casProperties))
            .otherwiseProxy()
            .get();
    }
This is {@link DelegatedAuthenticationDynamicDiscoverySelectionConfiguration}.

@author Misagh Moayyed
@since 6.5.0
support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/config/DelegatedAuthenticationDynamicDiscoverySelectionConfiguration.java