protected RegisteredService getRegisteredService(final SingleSignOnParticipationRequest ssoRequest) {
        return ssoRequest.getRequestContext()
            .map(Unchecked.function(requestContext -> WebUtils.resolveRegisteredService(requestContext, servicesManager, serviceSelectionStrategy)))
            .orElseGet(() -> ssoRequest.getAttributeValue(RegisteredService.class.getName(), RegisteredService.class));
    }
Determine registered service.

@param ssoRequest the sso request
@return the registered service
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/BaseSingleSignOnParticipationStrategy.java