-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72f29f8
commit a48bb51
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
## Module Description | ||
|
||
This module implements [XEP-0484: Fast Authentication Streamlining Tokens](https://xmpp.org/extensions/xep-0484.html). | ||
It provides services necessary to: | ||
|
||
* issue auth tokens for authenticated users; | ||
* reconnect to the server using the tokens instead of the original auth method. | ||
|
||
Tokens are stored in RDBMS. | ||
|
||
It is not related to another similar module `mod_auth_token`. | ||
|
||
## Options | ||
|
||
### `modules.mod_fast_auth_token.backend` | ||
* **Syntax:** non-empty string | ||
* **Default:** `"rdbms"` | ||
* **Example:** `backend = "rdbms"` | ||
|
||
Token storage backend. Currently only `"rdbms"` is supported. | ||
|
||
### `modules.mod_fast_auth_token.validity_period` | ||
* **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"`). | ||
* **Default:** `{access = {value = 3, unit = "days"}, rotate_before_expire = {value = 6, unit = "hours"}}` | ||
* **Example:** `validity_period.access = {value = 30, unit = "minutes"}` | ||
|
||
The user can use each token for `access` period of time before it expired. | ||
|
||
The server would [send](https://xmpp.org/extensions/xep-0484.html#token-rotation) | ||
a new token at the login time `rotate_before_expire` time before it expires. | ||
Set it to 0 to disable automatic rotation. | ||
|
||
## Example configuration | ||
|
||
```toml | ||
[modules.mod_fast_auth_token] | ||
validity_period.access = {value = 1, unit = "days"} | ||
validity_period.rotate_before_expire = {value = 0, unit = "days"} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters