public ModelAndView buildResponseModelAndView(final JEEContext context, final ServicesManager servicesManager,
                                                  final String clientId, final String redirectUrl,
                                                  final Map<String, String> parameters) throws Exception {
        OAuth20Utils.validateRedirectUri(redirectUrl);

        val registeredService = OAuth20Utils.getRegisteredOAuthServiceByClientId(servicesManager, clientId);
        val responseType = requestParameterResolver.resolveResponseModeType(context);

        val builder = responseModeFactory.getBuilder(registeredService, responseType);
        return builder.build(registeredService, redirectUrl, parameters);
    }
Build response model and view.

@param context         the context
@param servicesManager the services manager
@param clientId        the client id
@param redirectUrl     the redirect url
@param parameters      the parameters
@return the model and view
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/callback/OAuth20InvalidAuthorizationResponseBuilder.java