12 local sm_bind_resource = require "core.sessionmanager".bind_resource; |
12 local sm_bind_resource = require "core.sessionmanager".bind_resource; |
13 local sm_make_authenticated = require "core.sessionmanager".make_authenticated; |
13 local sm_make_authenticated = require "core.sessionmanager".make_authenticated; |
14 local base64 = require "util.encodings".base64; |
14 local base64 = require "util.encodings".base64; |
15 |
15 |
16 local nodeprep = require "util.encodings".stringprep.nodeprep; |
16 local nodeprep = require "util.encodings".stringprep.nodeprep; |
17 local datamanager_load = require "util.datamanager".load; |
|
18 local usermanager_get_provider = require "core.usermanager".get_provider; |
|
19 local usermanager_get_sasl_handler = require "core.usermanager".get_sasl_handler; |
17 local usermanager_get_sasl_handler = require "core.usermanager".get_sasl_handler; |
20 local usermanager_user_exists = require "core.usermanager".user_exists; |
18 local usermanager_user_exists = require "core.usermanager".user_exists; |
21 local usermanager_get_password = require "core.usermanager".get_password; |
|
22 local usermanager_test_password = require "core.usermanager".test_password; |
|
23 local t_concat, t_insert = table.concat, table.insert; |
19 local t_concat, t_insert = table.concat, table.insert; |
24 local tostring = tostring; |
20 local tostring = tostring; |
25 local jid_split = require "util.jid".split; |
|
26 local md5 = require "util.hashes".md5; |
|
27 local config = require "core.configmanager"; |
|
28 |
21 |
29 local secure_auth_only = module:get_option("c2s_require_encryption") or module:get_option("require_encryption"); |
22 local secure_auth_only = module:get_option("c2s_require_encryption") or module:get_option("require_encryption"); |
30 local sasl_backend = module:get_option("sasl_backend") or "builtin"; |
23 local sasl_backend = module:get_option("sasl_backend") or "builtin"; |
31 local anonymous_login = module:get_option("anonymous_login"); |
24 local anonymous_login = module:get_option("anonymous_login"); |
32 |
25 |