protected Service locateServiceForRequest(final RequestContext context) throws Throwable {
        val strategies = getConfigurationContext().getAuthenticationRequestServiceSelectionStrategies();
        val serviceFromFlow = WebUtils.getService(context);
        val serviceFromRequest = WebUtils.getService(getConfigurationContext().getArgumentExtractors(), context);
        if (serviceFromFlow == null) {
            return strategies.resolveService(serviceFromRequest);
        }
        if (serviceFromRequest != null) {
            val fragment = serviceFromRequest.getFragment();
            if (fragment != null) {
                serviceFromFlow.setFragment(fragment);
            }
        }
        return strategies.resolveService(serviceFromFlow);
    }
This is {@link DefaultCasDelegatingWebflowEventResolver},
which handles the initial authentication attempt and calls upon a number of
embedded resolvers to produce the next event in the authentication flow.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/resolver/impl/DefaultCasDelegatingWebflowEventResolver.java