protected Service restoreAuthenticationRequestInContext(final RequestContext requestContext,
                                                            final String givenClientName) {
        try {
            val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
            val response = WebUtils.getHttpServletResponseFromExternalWebflowContext(requestContext);
            val webContext = new JEEContext(request, response);
            val clientResult = configContext.getIdentityProviders()
                .findClient(givenClientName, webContext)
                .map(BaseClient.class::cast)
                .orElseThrow(() -> new IllegalArgumentException("Unable to find client " + givenClientName + " to restore authentication context"));
            return delegatedClientAuthenticationWebflowManager.retrieve(requestContext, webContext, clientResult);
        } catch (final Throwable e) {
            LoggingUtils.error(LOGGER, e);
        }
        throw UnauthorizedServiceException.denied("Denied: %s".formatted(givenClientName));
    }
This class represents an action to put at the beginning of the webflow.
<p>
Before any authentication, redirection urls are computed for the different clients defined as well as the theme,
locale, method and service are saved into the web session.</p>
After authentication, appropriate information are expected on this callback url to finish the authentication
process with the provider.

@author Jerome Leleu
@since 3.5.0
support/cas-server-support-pac4j-webflow/src/main/java/org/apereo/cas/web/flow/actions/DelegatedClientAuthenticationAction.java