code: public static String encryptToBase64Url(String url) {
          url = encryptToBase64(url);
          if (url.indexOf("+") != -1) {
              url = url.replaceAll("\\+", "*");
          }
          if (url.indexOf("/") != -1) {
              url = url.replaceAll("/", "_");
          }
          return url;
      }
docs: Base64加密 url变种，[+替换成*] [/替换成_]