Software /
code /
prosody-modules
Annotate
mod_invites_register/README.markdown @ 5119:048e339706ba
mod_rest: Remove manual reference expansion in schema
This hack was originally added to reduce the number of definitions of
common attributes (type, to, from etc) and payloads (e.g. delay). This
predated pointers and references, and until now was needed because
parsing picked out the correct stanza kind from the schema, which broke
internal references.
Removing this hack paves the way for allowing the schema to be
configured or customized more easily.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 20 Dec 2022 21:48:28 +0100 |
parent | 4635:415264707251 |
child | 5141:027fb71ad509 |
rev | line source |
---|---|
4106
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 --- |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 labels: |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 - 'Stage-Beta' |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 summary: 'Allow account registration using invite tokens' |
4635
415264707251
mod_invites_register: Depend on mod_invites [rockspec]
Kim Alvefur <zash@zash.se>
parents:
4224
diff
changeset
|
5 rockspec: |
415264707251
mod_invites_register: Depend on mod_invites [rockspec]
Kim Alvefur <zash@zash.se>
parents:
4224
diff
changeset
|
6 dependencies: |
415264707251
mod_invites_register: Depend on mod_invites [rockspec]
Kim Alvefur <zash@zash.se>
parents:
4224
diff
changeset
|
7 - mod_invites |
4106
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 ... |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
10 Introduction |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 ============ |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 This module is part of the suite of modules that implement invite-based |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 account registration for Prosody. The other modules are: |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 |
4223
4ec755c13e9b
mod_invites*: Link to each other
Kim Alvefur <zash@zash.se>
parents:
4106
diff
changeset
|
16 - [mod_invites] |
4ec755c13e9b
mod_invites*: Link to each other
Kim Alvefur <zash@zash.se>
parents:
4106
diff
changeset
|
17 - [mod_invites_adhoc] |
4ec755c13e9b
mod_invites*: Link to each other
Kim Alvefur <zash@zash.se>
parents:
4106
diff
changeset
|
18 - [mod_invites_page] |
4ec755c13e9b
mod_invites*: Link to each other
Kim Alvefur <zash@zash.se>
parents:
4106
diff
changeset
|
19 - [mod_invites_register_web] |
4224
816c2fa1ca84
mod_invites*: Also link to mod_invites_api
Kim Alvefur <zash@zash.se>
parents:
4223
diff
changeset
|
20 - [mod_invites_api] |
4223
4ec755c13e9b
mod_invites*: Link to each other
Kim Alvefur <zash@zash.se>
parents:
4106
diff
changeset
|
21 - [mod_register_apps] |
4106
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 |
4223
4ec755c13e9b
mod_invites*: Link to each other
Kim Alvefur <zash@zash.se>
parents:
4106
diff
changeset
|
23 For details and a full overview, start with the [mod_invites] documentation. |
4106
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 Details |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 ======= |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 This module allows clients to register an account using an invite ('preauth') |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 token generated by mod_invites. It implements the protocol described at |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 [docs.modernxmpp.org/client/invites](https://docs.modernxmpp.org/client/invites) |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 and [XEP-0401 version 0.3.0](https://xmpp.org/extensions/attic/xep-0401-0.3.0.html). |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
33 **Note to developers:** the XEP-0401 protocol is expected to change in the future, |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
34 though Prosody will attempt to maintain backwards compatibility with the 0.3.0 protocol |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
35 for as long as necessary. |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
36 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
37 This module is also responsible for implementing the optional server-side part |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
38 of [XEP-0379: Pre-Authenticated Roster Subscriptions](https://xmpp.org/extensions/xep-0379.html). |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
39 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
40 **Note to admins:** Loading this module will disable registration for users |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
41 without an invite token by default. Control this behaviour |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
42 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
43 # Configuration |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
44 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
45 | Name | Description | Default | |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
46 |--------------------------|----------------------------------------------------------|---------| |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
47 | registration_invite_only | Require an invitation token for all account registration | `true` | |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
48 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
49 ## Example: Invite-only registration |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
50 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
51 This setup enables registration **only** for users that have a valid |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
52 invite token. |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
53 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
54 ``` {.lua} |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
55 allow_registration = true |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
56 registration_invite_only = true |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
57 ``` |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
58 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
59 ## Example: Open registration |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
60 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
61 This setup allows completely **open registration**, even without |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
62 an invite token. |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
63 |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
64 ``` {.lua} |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
65 allow_registration = true |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
66 registration_invite_only = false |
d34572047488
mod_invites_register: New module to allow IBR with invite tokens
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
67 ``` |