@Override
    public List<? extends Client> findAllClients(final Service service, final WebContext webContext) {
        val tenant = tenantExtractor.extract(webContext.getRequestURL());
        if (tenant.isPresent()) {
            val definition = tenant.get();
            val tenantKey = tenantExtractor.getTenantKey(definition);
            var providers = delegatedIdentityProviderFactory.retrieve(tenantKey);
            if (providers.isEmpty()) {
                providers = Optional.of(definition.bindProperties())
                    .filter(bindingContext -> bindingContext.containsBindingFor(Pac4jDelegatedAuthenticationProperties.class))
                    .map(ConfigurationPropertiesBindingContext::value)
                    .map(Unchecked.function(delegatedIdentityProviderFactory::buildFrom))
                    .stream()
                    .flatMap(List::stream)
                    .collect(Collectors.toList());
                val policy = definition.getDelegatedAuthenticationPolicy();
                if (policy != null && !policy.getAllowedProviders().isEmpty()) {
                    val builtProviders = new ArrayList<>(delegatedIdentityProviderFactory.build());
                    builtProviders.removeIf(client -> !policy.getAllowedProviders().contains(client.getName()));
                    providers.addAll(builtProviders);
                }
                delegatedIdentityProviderFactory.store(tenantKey, providers);
            }
            return providers;
        }

        val providers = delegatedIdentityProviderFactory.build();
        LOGGER.trace("The following clients are built: [{}]", providers);
        return new ArrayList<>(providers);
    }
This is {@link DefaultDelegatedIdentityProviders}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-pac4j-core-clients/src/main/java/org/apereo/cas/support/pac4j/authentication/clients/DefaultDelegatedIdentityProviders.java