You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/modules/mod_auth_token.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ Validity period configuration for provision tokens happens outside the module si
39
39
40
40
### Required keys
41
41
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`.
43
43
44
44
## Token types
45
45
@@ -49,19 +49,22 @@ Three token types are supported:
49
49
Access tokens can be used as a payload for the X-OAUTH authentication mechanism and grant access to the system.
50
50
Access tokens can't be revoked.
51
51
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`.
52
53
53
54
-_refresh tokens_: These are longer lived tokens which are tracked by the server and therefore require persistent storage in a relational database.
54
55
Refresh tokens can be used as a payload for the X-OAUTH authentication mechanism and to grant access to the system.
55
56
Also they can result in a new set of tokens being returned upon successful authentication.
56
57
They can be revoked - if a refresh token hasn't been revoked, it is valid until it has expired.
57
58
On revocation, it immediately becomes invalid.
58
59
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`.
59
61
60
62
-_provision tokens_: These tokens are generated by a service external to the server.
61
63
They grant the owner a permission to create an account.
62
64
A provision token may contain information which the server can use to provision the VCard for the newly created account.
63
65
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.
64
66
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.
0 commit comments