@Override
    public boolean canHandle(final HttpServletRequest request, final HttpServletResponse response) {
        val proxyGrantingTicket = request.getParameter(CasProtocolConstants.PARAMETER_PROXY_GRANTING_TICKET);
        val targetService = getTargetService(request);
        return properties.getSso().isProxyAuthnEnabled() && targetService != null && StringUtils.hasText(proxyGrantingTicket);
    }
The view to redirect to on a validation failure.
support/cas-server-support-validation-core/src/main/java/org/apereo/cas/web/v2/ProxyController.java