Comparison

util/sasl_cyrus.lua @ 2394:a2972f9fda6d

util.sasl_cyrus: Further fixing and cleanup.
author Tobias Markmann <tm@ayena.de>
date Tue, 22 Dec 2009 21:08:58 +0100
parent 2393:1572be348f88
child 2396:39b2523bcf44
comparison
equal deleted inserted replaced
2393:1572be348f88 2394:a2972f9fda6d
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)