public static void checkSinglePageToken(Context ctx) {
    // check if query parameters contain  token key
    String token = ctx.queryParam("token");

    if (StringUtils.isNotEmpty(token)) {
      // regex extract  catalog, db, table
      String url = ctx.req.getRequestURI();
      for (String whiteListUrl : TOKEN_WHITE_LIST) {
        if (url.contains(whiteListUrl)) {
          return;
        }
      }
      String catalog = ctx.queryParam("catalog");
      String db = ctx.queryParam("db");
      String table = ctx.queryParam("table");
      if (StringUtils.isEmpty(catalog) && StringUtils.isEmpty(db) && StringUtils.isEmpty(table)) {
        String[] splitResult = url.split("/");
        for (int i = 0; i < splitResult.length; i++) {
          switch (splitResult[i]) {
            case "catalogs":
              catalog = splitResult[i + 1];
              break;
            case "dbs":
              db = splitResult[i + 1];
              break;
            case "tables":
              table = splitResult[i + 1];
              break;
          }
        }
      }
      if (StringUtils.isEmpty(catalog)
          || StringUtils.isEmpty(db)
          || StringUtils.isEmpty(table)
          || !token.equals(generateTablePageToken(catalog, db, table))) {
        throw new SignatureCheckException();
      }
    }
  }
Check single page access token.

@param ctx The context object containing the request information.
@throws SignatureCheckException If the token is invalid or missing.
amoro-ams/src/main/java/org/apache/amoro/server/dashboard/utils/CommonUtil.java