private Optional<String> getJwtRequestParameter(final Service service,
                                                    final String paramName) throws Exception {
        if (service.getAttributes().containsKey(OAuth20Constants.REQUEST)) {
            val jwtRequest = service.getFirstAttribute(OAuth20Constants.REQUEST, String.class);
            val registeredService = getServicesManager().findServiceBy(service);
            val paramValue = requestParameterResolver.resolveJwtRequestParameter(jwtRequest, registeredService, paramName, String.class);
            return Optional.of(paramValue);
        }
        return Optional.empty();
    }
This is {@link OAuth20AuthenticationServiceSelectionStrategy}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/services/OAuth20AuthenticationServiceSelectionStrategy.java