APISonar


org.apereo.cas.validation.ValidationResponseType.JSON

> org > apereo > cas > validation > ValidationResponseType > JSON
org APIs apereo APIs cas APIs validation APIs ValidationResponseType APIs JSON APIs

Example 1
public View getView(final HttpServletRequest request,
                        final boolean isSuccess,
                        final WebApplicationService service,
                        final Class ownerClass) {
        val type = getValidationResponseType(request, service);
        if (type == ValidationResponseType.JSON) {
            return getSingleInstanceView(ServiceValidationViewTypes.JSON);
        }
        return isSuccess
            ? getSuccessView(ownerClass.getSimpleName())
            : getFailureView(ownerClass.getSimpleName());
    }
Example 2
private ModelAndView getModelAndView(final HttpServletRequest request, final boolean isSuccess, final WebApplicationService service) {
        val type = getValidationResponseType(request, service);
        if (type == ValidationResponseType.JSON) {
            return new ModelAndView(this.jsonView);
        }
        return new ModelAndView(isSuccess ? this.successView : this.failureView);
    }