Skip to main content
Home
Works with
This package works with Node.js, Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers, Bun
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score100%
Downloads3/wk
Published9 months ago (2.2.0)

Generate API keys and tokens used by 4Players ODIN.

interface TokenOptions

Additional fields that can be set inside a Token

Properties

optional
customer: string

set the customer identification

optional
audience: "gateway" | "sfu"

restrict who can accept the token

optional
subject: string | string[]

restrict the purpose of the token

optional
address: string

set the specific server address to use

optional
tags: string[]

set optional tags to assign to the client

optional
upstream: string

set the specific upstream address to use

optional
lifetime: number

how long the token remains valid

optional
internal: Record<string, unknown>

custom properties to store

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@4players/odin-tokens

Import symbol

import { type TokenOptions } from "@4players/odin-tokens";
or

Import directly with a jsr specifier

import { type TokenOptions } from "jsr:@4players/odin-tokens";

Add Package

pnpm i jsr:@4players/odin-tokens
or (using pnpm 10.8 or older)
pnpm dlx jsr add @4players/odin-tokens

Import symbol

import { type TokenOptions } from "@4players/odin-tokens";

Add Package

yarn add jsr:@4players/odin-tokens
or (using Yarn 4.8 or older)
yarn dlx jsr add @4players/odin-tokens

Import symbol

import { type TokenOptions } from "@4players/odin-tokens";

Add Package

vlt install jsr:@4players/odin-tokens

Import symbol

import { type TokenOptions } from "@4players/odin-tokens";

Add Package

npx jsr add @4players/odin-tokens

Import symbol

import { type TokenOptions } from "@4players/odin-tokens";

Add Package

bunx jsr add @4players/odin-tokens

Import symbol

import { type TokenOptions } from "@4players/odin-tokens";