Skip to content

Commit 0f5700b

Browse files
authored
Merge pull request #4354 from esl/documentation-update
Updating mod_keystore and mod_auth_token documentation
2 parents dc0e05a + 6dcbb46 commit 0f5700b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Diff for: doc/modules/mod_auth_token.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Validity period configuration for provision tokens happens outside the module si
3939

4040
### Required keys
4141

42-
To read more about the keys MongooseIM makes use of, please refer to [mod_keystore](mod_keystore.md) documentation.
42+
To read more about the keys MongooseIM makes use of, please refer to [mod_keystore](mod_keystore.md) documentation, where you can find an example configuration when using `mod_auth_token`.
4343

4444
## Token types
4545

@@ -49,19 +49,22 @@ Three token types are supported:
4949
Access tokens can be used as a payload for the X-OAUTH authentication mechanism and grant access to the system.
5050
Access tokens can't be revoked.
5151
An access token is valid only until its expiry date is reached.
52+
In mod_keystore, the keyname for this token type is `token_secret`.
5253

5354
- _refresh tokens_: These are longer lived tokens which are tracked by the server and therefore require persistent storage in a relational database.
5455
Refresh tokens can be used as a payload for the X-OAUTH authentication mechanism and to grant access to the system.
5556
Also they can result in a new set of tokens being returned upon successful authentication.
5657
They can be revoked - if a refresh token hasn't been revoked, it is valid until it has expired.
5758
On revocation, it immediately becomes invalid.
5859
As the server stores information about granted tokens, it can also persistently mark them as revoked.
60+
In mod_keystore, the keyname for this token type is `token_secret`.
5961

6062
- _provision tokens_: These tokens are generated by a service external to the server.
6163
They grant the owner a permission to create an account.
6264
A provision token may contain information which the server can use to provision the VCard for the newly created account.
6365
Using a provision token to create an account (and inject VCard data) is done similarly to other token types, i.e. by passing it as payload for the X-OAUTH mechanism.
6466
The XMPP server has no way of tracking and revoking provision tokens, as they come from an outside source.
67+
In mod_keystore, the keyname for this token type is `provision_pre_shared`. The usage of this token type is optional.
6568

6669
## Token serialization format
6770

Diff for: doc/modules/mod_keystore.md

+7
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,10 @@ for each virtual XMPP domain):
7575
{name = "access_psk", type = "file", path = "priv/second_access_psk"},
7676
{name = "provision_psk", type = "file", path = "priv/second_provision_psk"}]
7777
```
78+
79+
Minimal configuration supporting mod_auth_token:
80+
81+
```toml
82+
[modules.mod_keystore]
83+
keys = [{name = "token_secret", type = "ram"}]
84+
```

0 commit comments

Comments
 (0)