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 ​
Name | Type |
---|---|
account | Account |
Returns ​
Promise
<undefined
| string
>
Defined in ​
fetch ​
Usage
Athena.systems.jwt.fetch(player
): Promise
<string
| null
>
Parameters ​
Name | Type |
---|---|
player | Player |
Returns ​
Promise
<string
| null
>
Defined in ​
override ​
Usage
Athena.systems.jwt.override(functionName
, callback
): any
Used to override jwt functions.
Parameters ​
Name | Type |
---|---|
functionName | "create" |
callback | (account : Account ) => Promise <undefined | string > |
Returns ​
any
Defined in ​
Usage
Athena.systems.jwt.override(functionName
, callback
): any
Used to override jwt functions.
Parameters ​
Name | Type |
---|---|
functionName | "verify" |
callback | (data : string ) => Promise <string | undefined > |
Returns ​
any
Defined in ​
Usage
Athena.systems.jwt.override(functionName
, callback
): any
Used to override jwt functions.
Parameters ​
Name | Type |
---|---|
functionName | "fetch" |
callback | (player : Player ) => Promise <string | null > |
Returns ​
any
Defined in ​
verify ​
Usage
Athena.systems.jwt.verify(data
): Promise
<string
| undefined
>
Verifies a compact JWT string is valid.
Parameters ​
Name | Type |
---|---|
data | string |
Returns ​
Promise
<string
| undefined
>