|
| 1 | +## Module Description |
| 2 | + |
| 3 | +This module implements [XEP-0484: Fast Authentication Streamlining Tokens](https://xmpp.org/extensions/xep-0484.html). |
| 4 | +It provides services necessary to: |
| 5 | + |
| 6 | +* issue auth tokens for authenticated users; |
| 7 | +* reconnect to the server using the tokens instead of the original auth method. |
| 8 | + |
| 9 | +Tokens are stored in RDBMS. |
| 10 | + |
| 11 | +It is not related to another similar module `mod_auth_token`. |
| 12 | + |
| 13 | +## Options |
| 14 | + |
| 15 | +### `modules.mod_fast_auth_token.backend` |
| 16 | +* **Syntax:** non-empty string |
| 17 | +* **Default:** `"rdbms"` |
| 18 | +* **Example:** `backend = "rdbms"` |
| 19 | + |
| 20 | +Token storage backend. Currently only `"rdbms"` is supported. |
| 21 | + |
| 22 | +### `modules.mod_fast_auth_token.validity_period` |
| 23 | +* **Syntax:** TOML table. Each key is either `access` or `rotate_before_expire`.Each value is a nested TOML table with the following mandatory keys: `value` (non-negative integer) and `unit` (`"days"`, `"hours"`, `"minutes"` or `"seconds"`). |
| 24 | +* **Default:** `{access = {value = 3, unit = "days"}, rotate_before_expire = {value = 6, unit = "hours"}}` |
| 25 | +* **Example:** `validity_period.access = {value = 30, unit = "minutes"}` |
| 26 | + |
| 27 | +The user can use each token for `access` period of time before it expired. |
| 28 | + |
| 29 | +The server would [send](https://xmpp.org/extensions/xep-0484.html#token-rotation) |
| 30 | +a new token at the login time `rotate_before_expire` time before it expires. |
| 31 | +Set it to 0 to disable automatic rotation. |
| 32 | + |
| 33 | +## Example configuration |
| 34 | + |
| 35 | +```toml |
| 36 | +[modules.mod_fast_auth_token] |
| 37 | + validity_period.access = {value = 1, unit = "days"} |
| 38 | + validity_period.rotate_before_expire = {value = 0, unit = "days"} |
| 39 | +``` |
0 commit comments