code: public static String buildRedirectToSubsystemUrl(String landingUrl, String subsystemToken, String targetUrl) {
          StringBuilder buf = new StringBuilder();
          buf.append(landingUrl);
          buf.append(landingUrl.contains("?") ? "&" : "?");
          buf.append("subsystemToken").append("=").append(encodeForUrl(subsystemToken));
          buf.append("&");
          buf.append("targetUrl").append("=").append(encodeForUrl(targetUrl));
          return buf.toString();
      }
docs: seconds