Skip to content
On this page

Athena.systems.jwt

Functions

create

Usage

Athena.systems.jwt.create(account): Promise<undefined | string>

Creates a JWT token with basic account id inside of it.

Parameters

NameType
accountAccount

Returns

Promise<undefined | string>

Defined in

server/systems/jwt.ts:60


fetch

Usage

Athena.systems.jwt.fetch(player): Promise<string | null>

Parameters

NameType
playerPlayer

Returns

Promise<string | null>

Defined in

server/systems/jwt.ts:103


override

Usage

Athena.systems.jwt.override(functionName, callback): any

Used to override jwt functions.

Parameters

NameType
functionName"create"
callback(account: Account) => Promise<undefined | string>

Returns

any

Defined in

server/systems/jwt.ts:159

Usage

Athena.systems.jwt.override(functionName, callback): any

Used to override jwt functions.

Parameters

NameType
functionName"verify"
callback(data: string) => Promise<string | undefined>

Returns

any

Defined in

server/systems/jwt.ts:160

Usage

Athena.systems.jwt.override(functionName, callback): any

Used to override jwt functions.

Parameters

NameType
functionName"fetch"
callback(player: Player) => Promise<string | null>

Returns

any

Defined in

server/systems/jwt.ts:161


verify

Usage

Athena.systems.jwt.verify(data): Promise<string | undefined>

Verifies a compact JWT string is valid.

Parameters

NameType
datastring

Returns

Promise<string | undefined>

Defined in

server/systems/jwt.ts:85

Created by Stuyk | Est. 2020