private static SAML2Client createSaml2Client(final SAML2Client saml2Client,
                                                 final SAML2Configuration singleConfiguration) {
        val singleClient = new SAML2Client(singleConfiguration);
        singleClient.setDecrypter(saml2Client.getDecrypter());
        singleClient.setSignatureSigningParametersProvider(saml2Client.getSignatureSigningParametersProvider());

        val contextProvider = new SAML2ContextProvider(singleConfiguration.getIdentityProviderMetadataResolver(),
            saml2Client.getServiceProviderMetadataResolver(), saml2Client.getConfiguration().getSamlMessageStoreFactory());
        singleClient.setContextProvider(contextProvider);
        
        singleClient.setSignatureSigningParametersProvider(saml2Client.getSignatureSigningParametersProvider());
        singleClient.setReplayCache(saml2Client.getReplayCache());
        singleClient.setAuthnResponseValidator(saml2Client.getAuthnResponseValidator());
        singleClient.setSoapPipelineProvider(new DefaultSOAPPipelineProvider(singleClient));
        singleClient.setLogoutValidator(saml2Client.getLogoutValidator());
        singleClient.setRedirectionActionBuilder(new SAML2RedirectionActionBuilder(singleClient));
        singleClient.setCredentialsExtractor(saml2Client.getCredentialsExtractor());
        singleClient.setAuthenticator(saml2Client.getAuthenticator());
        singleClient.setLogoutProcessor(new SAML2LogoutProcessor(singleClient));
        singleClient.setLogoutActionBuilder(new SAML2LogoutActionBuilder(singleClient));
        singleClient.setServiceProviderMetadataResolver(saml2Client.getServiceProviderMetadataResolver());
        singleClient.setStateGenerator(new SAML2StateGenerator(singleClient));
        singleClient.setWebSsoMessageSender(saml2Client.getWebSsoMessageSender());
        singleClient.setLogoutRequestMessageSender(saml2Client.getLogoutRequestMessageSender());
        return singleClient;
    }
This is {@link DelegatedClientSaml2Builder}.

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