diff --git a/doc/configuration/Modules.md b/doc/configuration/Modules.md index 1b8ab7efdeb..a6ac1bffdcf 100644 --- a/doc/configuration/Modules.md +++ b/doc/configuration/Modules.md @@ -99,6 +99,9 @@ This applies to situations such as sending messages or presences to mobile/SMS/e Implements [XEP-0215: External Service Discovery](http://xmpp.org/extensions/xep-0215.html) for discovering information about services external to the XMPP network. The main use-case is to help discover STUN/TURN servers to allow for negotiating media exchanges. +### [mod_fast_auth_token](../modules/mod_fast_auth_token.md) +A module that implements [XEP-0484: Fast Authentication Streamlining Tokens](https://xmpp.org/extensions/xep-0484.html).. + ### [mod_http_upload](../modules/mod_http_upload.md) Implements [XEP-0363: HTTP File Upload](https://xmpp.org/extensions/xep-0363.html) for coordinating with an XMPP server to upload files via HTTP and receive URLs that can be shared in messages. diff --git a/doc/modules/mod_fast_auth_token.md b/doc/modules/mod_fast_auth_token.md new file mode 100644 index 00000000000..03f8959861c --- /dev/null +++ b/doc/modules/mod_fast_auth_token.md @@ -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"} +``` diff --git a/mkdocs.yml b/mkdocs.yml index 2b5b7d7f44e..c125abf834b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -133,6 +133,7 @@ nav: - 'RabbitMQ backend': 'modules/mod_event_pusher_rabbit.md' - 'SNS backend': 'modules/mod_event_pusher_sns.md' - 'mod_extdisco': 'modules/mod_extdisco.md' + - 'mod_fast_auth_token': 'modules/mod_fast_auth_token.md' - 'mod_global_distrib': 'modules/mod_global_distrib.md' - 'mod_http_upload': 'modules/mod_http_upload.md' - 'mod_inbox': 'modules/mod_inbox.md'