# HG changeset patch # User Waqas Hussain # Date 1347468111 -18000 # Node ID 2c7e1ce8f48266283e5183cfc30c104b20d76d61 # Parent 5f9066db1b4d2c55188dcdb6266ae92688cdcaad mod_auth_*: Use module:provides(). diff -r 5f9066db1b4d -r 2c7e1ce8f482 plugins/mod_auth_anonymous.lua --- a/plugins/mod_auth_anonymous.lua Wed Sep 12 21:40:00 2012 +0500 +++ b/plugins/mod_auth_anonymous.lua Wed Sep 12 21:41:51 2012 +0500 @@ -10,7 +10,7 @@ local datamanager = require "util.datamanager"; -- define auth provider -local provider = { name = "anonymous" }; +local provider = {}; function provider.test_password(username, password) return nil, "Password based auth not supported."; @@ -62,5 +62,5 @@ datamanager.remove_callback(dm_callback); end -module:add_item("auth-provider", provider); +module:provides("auth", provider); diff -r 5f9066db1b4d -r 2c7e1ce8f482 plugins/mod_auth_cyrus.lua --- a/plugins/mod_auth_cyrus.lua Wed Sep 12 21:40:00 2012 +0500 +++ b/plugins/mod_auth_cyrus.lua Wed Sep 12 21:41:51 2012 +0500 @@ -44,7 +44,7 @@ local host = module.host; -- define auth provider -local provider = { name = "cyrus" }; +local provider = {}; log("debug", "initializing default authentication provider for host '%s'", host); function provider.test_password(username, password) @@ -80,5 +80,5 @@ return handler; end -module:add_item("auth-provider", provider); +module:provides("auth", provider); diff -r 5f9066db1b4d -r 2c7e1ce8f482 plugins/mod_auth_internal_hashed.lua --- a/plugins/mod_auth_internal_hashed.lua Wed Sep 12 21:40:00 2012 +0500 +++ b/plugins/mod_auth_internal_hashed.lua Wed Sep 12 21:41:51 2012 +0500 @@ -41,7 +41,7 @@ local host = module.host; -- define auth provider -local provider = { name = "internal_hashed" }; +local provider = {}; log("debug", "initializing internal_hashed authentication provider for host '%s'", host); function provider.test_password(username, password) @@ -145,5 +145,5 @@ return new_sasl(host, testpass_authentication_profile); end -module:add_item("auth-provider", provider); +module:provides("auth", provider); diff -r 5f9066db1b4d -r 2c7e1ce8f482 plugins/mod_auth_internal_plain.lua --- a/plugins/mod_auth_internal_plain.lua Wed Sep 12 21:40:00 2012 +0500 +++ b/plugins/mod_auth_internal_plain.lua Wed Sep 12 21:41:51 2012 +0500 @@ -15,7 +15,7 @@ local host = module.host; -- define auth provider -local provider = { name = "internal_plain" }; +local provider = {}; log("debug", "initializing internal_plain authentication provider for host '%s'", host); function provider.test_password(username, password) @@ -78,5 +78,5 @@ return new_sasl(host, getpass_authentication_profile); end -module:add_item("auth-provider", provider); +module:provides("auth", provider);