Software / code / prosody
Annotate
plugins/mod_register.lua @ 12953:ebe3b2f96cad
mod_tokenauth: Switch to new token format (invalidates existing tokens!)
The new format has the following properties:
- 5 bytes longer than the previous format
- The token now has separate 'id' and 'secret' parts - the token itself is no
longer stored in the DB, and the secret part is hashed
- The only variable length field (JID) has been moved to the end
- The 'secret-token:' prefix (RFC 8959) is now included
Compatibility with the old token format was not maintained, and all previously
issued tokens are invalid after this commit (they will be removed from the DB
if used).
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 21 Mar 2023 14:33:29 +0000 |
| parent | 11013:bb010c3c8c93 |
| rev | line source |
|---|---|
|
1523
841d61be198f
Remove version number from copyright headers
Matthew Wild <mwild1@gmail.com>
parents:
1189
diff
changeset
|
1 -- Prosody IM |
|
2923
b7049746bd29
Update copyright headers for 2010
Matthew Wild <mwild1@gmail.com>
parents:
2448
diff
changeset
|
2 -- Copyright (C) 2008-2010 Matthew Wild |
|
b7049746bd29
Update copyright headers for 2010
Matthew Wild <mwild1@gmail.com>
parents:
2448
diff
changeset
|
3 -- Copyright (C) 2008-2010 Waqas Hussain |
|
5776
bd0ff8ae98a8
Remove all trailing whitespace
Florian Zeitz <florob@babelmonkeys.de>
parents:
5763
diff
changeset
|
4 -- |
| 758 | 5 -- This project is MIT/X11 licensed. Please see the |
| 6 -- COPYING file in the source package for more information. | |
|
519
cccd610a0ef9
Insert copyright/license headers
Matthew Wild <mwild1@gmail.com>
parents:
438
diff
changeset
|
7 -- |
|
cccd610a0ef9
Insert copyright/license headers
Matthew Wild <mwild1@gmail.com>
parents:
438
diff
changeset
|
8 |
|
cccd610a0ef9
Insert copyright/license headers
Matthew Wild <mwild1@gmail.com>
parents:
438
diff
changeset
|
9 |
|
4270
d2d47fde9811
mod_register: Change the default for 'allow_registration' from true to false, most users shouldn't be affected as allow_registration is already explicitly set in the default config file.
Matthew Wild <mwild1@gmail.com>
parents:
4269
diff
changeset
|
10 local allow_registration = module:get_option_boolean("allow_registration", false); |
|
4398
acc37e221940
mod_register: Add support for additional registration fields
Florian Zeitz <florob@babelmonkeys.de>
parents:
4270
diff
changeset
|
11 |
|
8484
f591855f060d
mod_register: Split into mod_register_ibr and mod_user_account_management (#723)
Kim Alvefur <zash@zash.se>
parents:
8464
diff
changeset
|
12 if allow_registration then |
|
f591855f060d
mod_register: Split into mod_register_ibr and mod_user_account_management (#723)
Kim Alvefur <zash@zash.se>
parents:
8464
diff
changeset
|
13 module:depends("register_ibr"); |
|
11013
bb010c3c8c93
mod_register: Add a dependency on mod_watchregistrations
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
9608
diff
changeset
|
14 module:depends("watchregistrations"); |
|
3995
e504b06492c6
mod_register: Add registration_compat config option to allow account remove requests addressed to='host' (defaults to true)
Matthew Wild <mwild1@gmail.com>
parents:
3540
diff
changeset
|
15 end |
|
e504b06492c6
mod_register: Add registration_compat config option to allow account remove requests addressed to='host' (defaults to true)
Matthew Wild <mwild1@gmail.com>
parents:
3540
diff
changeset
|
16 |
|
8484
f591855f060d
mod_register: Split into mod_register_ibr and mod_user_account_management (#723)
Kim Alvefur <zash@zash.se>
parents:
8464
diff
changeset
|
17 module:depends("user_account_management"); |