17 |
17 |
18 local tostring = tostring; |
18 local tostring = tostring; |
19 local pairs, ipairs = pairs, ipairs; |
19 local pairs, ipairs = pairs, ipairs; |
20 local t_insert, t_concat = table.insert, table.concat; |
20 local t_insert, t_concat = table.insert, table.concat; |
21 local s_match = string.match; |
21 local s_match = string.match; |
|
22 local setmetatable = setmetatable |
22 |
23 |
23 local keys = keys; |
24 local keys = keys; |
24 |
25 |
25 local print = print |
26 local print = print |
|
27 local pcall = pcall |
26 |
28 |
27 module "sasl_cyrus" |
29 module "sasl_cyrus" |
28 |
30 |
29 local method = {}; |
31 local method = {}; |
30 method.__index = method; |
32 method.__index = method; |
31 local mechanisms = {}; |
|
32 local backend_mechanism = {}; |
|
33 |
33 |
34 pcall(cyrussasl.server_init, "prosody") |
34 pcall(cyrussasl.server_init, "prosody") |
35 |
35 |
36 -- create a new SASL object which can be used to authenticate clients |
36 -- create a new SASL object which can be used to authenticate clients |
37 function new(realm, service_name) |
37 function new(realm, service_name) |