@Override
    public Collection<String> resolveRequestedScopes(final WebContext context) {
        val map = resolveRequestParameters(CollectionUtils.wrap(OAuth20Constants.SCOPE), context);
        if (map == null || map.isEmpty()) {
            return new ArrayList<>();
        }
        val supported = jwtBuilder.getCasProperties().getAuthn().getOidc().getDiscovery().getScopes();
        val results = new LinkedHashSet<>(map.get(OAuth20Constants.SCOPE));
        results.retainAll(supported);
        return results;
    }
This is {@link DefaultOAuth20RequestParameterResolver}.

@author Misagh Moayyed
@since 6.6.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/DefaultOAuth20RequestParameterResolver.java