diff 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
line wrap: on
line diff
--- a/mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua	Wed Sep 12 23:58:01 2012 +0500
+++ b/mod_auth_dovecot/auth_dovecot/mod_auth_dovecot.lua	Thu Sep 13 00:08:29 2012 +0500
@@ -48,9 +48,7 @@
 	log("debug", "Mechanims found: %s", table.concat(m, ", "));
 end
 
-provider = {
-	name = module.name:gsub("^auth_","");
-};
+provider = {};
 
 function provider.test_password(username, password)
 	return new_sasl(module.host):plain_test(username, password);
@@ -90,5 +88,5 @@
 	provider.get_sasl_handler = nil
 end
 
-module:add_item("auth-provider", provider);
+module:provides("auth", provider);