protected Service populateContextWithService(final RequestContext context,
                                                 final Service service) throws Throwable {
        if (service != null) {
            val resolvedService = configContext.getAuthenticationRequestServiceSelectionStrategies().resolveService(service);
            LOGGER.trace("Authentication is resolved by service request from [{}]", service);
            val registeredService = configContext.getServicesManager().findServiceBy(resolvedService);
            LOGGER.trace("Located registered service [{}] mapped to resolved service [{}]", registeredService, resolvedService);
            WebUtils.putRegisteredService(context, registeredService);
            WebUtils.putServiceIntoFlowScope(context, service);
        }
        return service;
    }
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