Skip to content

Commit

Permalink
Add docs for mod_fast_auth_token
Browse files Browse the repository at this point in the history
  • Loading branch information
arcusfelis committed Jan 21, 2025
1 parent 72f29f8 commit a48bb51
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/configuration/Modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
39 changes: 39 additions & 0 deletions doc/modules/mod_fast_auth_token.md
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"}
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit a48bb51

Please sign in to comment.