JWT utilities.
- Source:
Methods
(static) generateToken(properties) → {string}
- Source:
- See:
Generates a JWT token with the specified properties.
This function will check that:
- The
exp
claim is set and is valid. - The
sub
claim is set.
Only some JWT claims are documented in the function's parameters, but other claims can be included.
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
properties |
object | Arbitrary JWT properties (see documentation links). Properties
|
Returns:
A JWT.
- Type
- string