private static String constructRedirectUrl(final String casServerLoginUrl,
                                               final String serviceUrl, final boolean renew) {
        return casServerLoginUrl + '?' + CasProtocolConstants.PARAMETER_SERVICE + '='
            + EncodingUtils.urlEncode(serviceUrl)
            + (renew ? '&' + CasProtocolConstants.PARAMETER_RENEW + "=true" : StringUtils.EMPTY);
    }
Handle federation request.

@param response the response
@param request  the request
@throws Exception the exception
support/cas-server-support-ws-idp/src/main/java/org/apereo/cas/ws/idp/web/WSFederationValidateRequestController.java