protected List<ConfigurableDelegatedClient> buildCasIdentityProviders(final CasConfigurationProperties casProperties) {
        val pac4jProperties = casProperties.getAuthn().getPac4j();
        return pac4jProperties
            .getCas()
            .stream()
            .filter(cas -> cas.isEnabled() && StringUtils.isNotBlank(cas.getLoginUrl()))
            .map(cas -> {
                val cfg = new CasConfiguration(cas.getLoginUrl(), CasProtocol.valueOf(cas.getProtocol()));
                val prefix = PATTERN_LOGIN_URL.matcher(cas.getLoginUrl()).replaceFirst("/");
                cfg.setPrefixUrl(StringUtils.appendIfMissing(prefix, "/"));
                cfg.setHostnameVerifier(casSSLContext.getHostnameVerifier());
                cfg.setSslSocketFactory(casSSLContext.getSslContext().getSocketFactory());
                return new ConfigurableDelegatedClient(new CasClient(cfg), cas);
            })
            .collect(Collectors.toList());
    }
This is {@link DelegatedClientCasBuilder}.

@author Misagh Moayyed
@since 7.1.0
support/cas-server-support-pac4j-cas/src/main/java/org/apereo/cas/pac4j/web/DelegatedClientCasBuilder.java