code: public static Token parseToken(byte[] secret, String token) {
          Token tk = new Token();
          if (S.blank(token)) return tk;
          String s = "";
          try {
              s = Crypto.decryptAES(token, secret);
          } catch (Exception e) {
              return tk;
          }
          String[] sa = s.split("\\|");
          if (sa.length < 2) return tk;
          tk.id = sa[0];
          try {
              tk.due = Long.parseLong(sa[1]);
              if (tk.expired()) {
                  return tk;
              }
          } catch (Exception e) {
              tk.due = $.ms() - 1000 * 60 * 60 * 24;
              return tk;
          }
          if (sa.length > 2) {
              sa = Arrays.copyOfRange(sa, 2, sa.length);
              tk.payload.addAll(C.listOf(sa));
          }
          return tk;
      }
docs: Parse a token string into token object
  @param token the token string
  @param secret the secret to decrypt the token string
  @return a token instance parsed from the string