Type alias AuthTokenV1_2

AuthTokenV1_2: {
    exp: number;
    iat: number;
    jti: string;
} & {
    scope: {
        app: {
            actions?: ("write" | "read" | "listChannels")[];
            analytics?: boolean;
            channels?: ({
                id?: string;
                name?: string;
            } & {
                actions: ((...) | (...) | (...) | (...) | (...))[];
                members: ((...) & (...) & (...))[];
                sfuBots?: (...)[];
            } & {
                [k: string]: unknown;
            })[];
            id: string;
            turn?: boolean;
        } & {
            [k: string]: unknown;
        };
    };
    version?: 1 | 2;
}

Type declaration

  • exp: number

    このトークンが無効になる時間を表すタイムスタンプ(UNIX timestamp)

  • iat: number

    トークンが発行された日時(UNIX timestamp)

  • jti: string

    トークンのユニークなid(uuid)

Type declaration

  • scope: {
        app: {
            actions?: ("write" | "read" | "listChannels")[];
            analytics?: boolean;
            channels?: ({
                id?: string;
                name?: string;
            } & {
                actions: ((...) | (...) | (...) | (...) | (...))[];
                members: ((...) & (...) & (...))[];
                sfuBots?: (...)[];
            } & {
                [k: string]: unknown;
            })[];
            id: string;
            turn?: boolean;
        } & {
            [k: string]: unknown;
        };
    }

    tokenの権限を表すクレーム[version:1,2,undefined]

    • app: {
          actions?: ("write" | "read" | "listChannels")[];
          analytics?: boolean;
          channels?: ({
              id?: string;
              name?: string;
          } & {
              actions: ((...) | (...) | (...) | (...) | (...))[];
              members: ((...) & (...) & (...))[];
              sfuBots?: (...)[];
          } & {
              [k: string]: unknown;
          })[];
          id: string;
          turn?: boolean;
      } & {
          [k: string]: unknown;
      }
  • Optional version?: 1 | 2

    tokenのバージョン[version:1,2,undefined]

    • 未指定やundefinedの場合は1として扱われます。
    • 3の場合とでscopeの構造に違いがあります。