SudoSOS Back-end API / authentication / JsonWebToken
Class: JsonWebToken ​
The contents of the JWT used for user authentication.
Constructors ​
Constructor ​
ts
new JsonWebToken(): JsonWebToken;Returns ​
JsonWebToken
Properties ​
| Property | Modifier | Type | Description |
|---|---|---|---|
exp? | readonly | number | The JWT expiry field. Set automatically by signing the token. |
iat? | readonly | number | The JWT expiry field. Set automatically by signing the token. |
nbf? | readonly | number | The JWT not-before field. Set automatically by signing the token. |
organs? | public | User[] | All the organs that the user is a part of. |
overrideMaintenance? | public | boolean | Whether this token should still be able to access all endpoints in maintenance mode |
posId? | public | number | The POS identifier. If present, this token is a "lesser" token (restricted access token created via PIN/NFC authentication). The presence of posId indicates a lesser token. |
roles | public | string[] | The roles that are assigned to the specific user. |
user | public | User | The token holds a reference to the user to which this token belongs. |