@Override
    public boolean validate(final WebContext context) {
        val clientIdResult = requestParameterResolver.resolveRequestParameter(context, OAuth20Constants.CLIENT_ID);
        return clientIdResult
            .map(this::getRegisteredServiceByClientId)
            .filter(Objects::nonNull)
            .map(registeredService -> {
                if (!requestParameterResolver.isAuthorizedResponseTypeForService(context, registeredService)) {
                    val responseTypeResult = requestParameterResolver.resolveRequestParameter(context, OAuth20Constants.RESPONSE_TYPE);
                    val msg = String.format("Client is not allowed to use the [%s] response type", responseTypeResult.orElse("unknown"));
                    LOGGER.warn(msg);
                    setErrorDetails(context, OAuth20Constants.UNAUTHORIZED_CLIENT, msg, true);
                    return false;
                }
                return true;
            })
            .orElse(false);
    }
This is {@link OAuth20AuthorizationCodeResponseTypeAuthorizationRequestValidator}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/validator/authorization/OAuth20AuthorizationCodeResponseTypeAuthorizationRequestValidator.java