comparison mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua @ 814:881ec9919144

mod_auth_*: Use module:provides(), and don't explicitly specify provider.name.
author Waqas Hussain <waqas20@gmail.com>
date Thu, 13 Sep 2012 00:08:29 +0500
parents 0c130c45b7c1
children c9e2beec4ef6
comparison
equal deleted inserted replaced
813:2469f779b3f7 814:881ec9919144
46 table.insert(m, k); 46 table.insert(m, k);
47 end 47 end
48 log("debug", "Mechanims found: %s", table.concat(m, ", ")); 48 log("debug", "Mechanims found: %s", table.concat(m, ", "));
49 end 49 end
50 50
51 provider = { 51 provider = {};
52 name = module.name:gsub("^auth_","");
53 };
54 52
55 function provider.test_password(username, password) 53 function provider.test_password(username, password)
56 return new_sasl(module.host):plain_test(username, password); 54 return new_sasl(module.host):plain_test(username, password);
57 end 55 end
58 56
88 end 86 end
89 87
90 provider.get_sasl_handler = nil 88 provider.get_sasl_handler = nil
91 end 89 end
92 90
93 module:add_item("auth-provider", provider); 91 module:provides("auth", provider);
94 92