private void processScopesAndResponsesAndGrants(final OidcClientRegistrationRequest registrationRequest,
                                                    final OidcRegisteredService registeredService) {
        val context = configurationContext.getObject();
        FunctionUtils.doIfNotNull(registrationRequest.getGrantTypes(),
            __ -> registeredService.setSupportedGrantTypes(new HashSet<>(registrationRequest.getGrantTypes())));
        FunctionUtils.doIfNotNull(registrationRequest.getResponseTypes(),
            __ -> registeredService.setSupportedResponseTypes(new HashSet<>(registrationRequest.getResponseTypes())));

        val properties = context.getCasProperties();
        val supportedScopes = new HashSet<>(properties.getAuthn().getOidc().getDiscovery().getScopes());
        registeredService.setScopes(supportedScopes);
        if (registeredService.getSupportedGrantTypes().isEmpty()) {
            registeredService.setSupportedGrantTypes(CollectionUtils.wrapHashSet(OAuth20GrantTypes.AUTHORIZATION_CODE.getType()));
        }
        if (registeredService.getSupportedResponseTypes().isEmpty()) {
            registeredService.setSupportedResponseTypes(CollectionUtils.wrapHashSet(OAuth20ResponseTypes.CODE.getType()));
        }
    }
This is {@link OidcDefaultClientRegistrationRequestTranslator}.

@author Misagh Moayyed
@since 6.6.0
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/web/controllers/dynareg/OidcDefaultClientRegistrationRequestTranslator.java