docs: protected String constructServiceUrl(final HttpServletRequest request, final HttpServletResponse response,
                                           final WSFederationRequest wsfedRequest) {
          try {
              val builder = new URIBuilder(wsFederationRequestConfigurationContext.getCallbackService().getId());
  
              builder.addParameter(WSFederationConstants.WA, wsfedRequest.getWa());
              builder.addParameter(WSFederationConstants.WREPLY, wsfedRequest.getWreply());
              builder.addParameter(WSFederationConstants.WTREALM, wsfedRequest.getWtrealm());
  
              if (StringUtils.isNotBlank(wsfedRequest.getWctx())) {
                  builder.addParameter(WSFederationConstants.WCTX, wsfedRequest.getWctx());
              }
              if (StringUtils.isNotBlank(wsfedRequest.getWfresh())) {
                  builder.addParameter(WSFederationConstants.WREFRESH, wsfedRequest.getWfresh());
              }
              if (StringUtils.isNotBlank(wsfedRequest.getWhr())) {
                  builder.addParameter(WSFederationConstants.WHR, wsfedRequest.getWhr());
              }
              if (StringUtils.isNotBlank(wsfedRequest.getWreq())) {
                  builder.addParameter(WSFederationConstants.WREQ, wsfedRequest.getWreq());
              }
  
              val url = builder.build();
  
              LOGGER.trace("Built service callback url [{}]", url);
              return org.jasig.cas.client.util.CommonUtils.constructServiceUrl(request, response,
                  url.toString(), wsFederationRequestConfigurationContext.getCasProperties().getServer().getName(),
                  CasProtocolConstants.PARAMETER_SERVICE,
                  CasProtocolConstants.PARAMETER_TICKET, false);
          } catch (final Exception e) {
              throw new SamlException(e.getMessage(), e);
          }
      }