diff mod_auth_external/mod_auth_external.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 8e9e5c7d97ff
children 960007b0901e
line wrap: on
line diff
--- a/mod_auth_external/mod_auth_external.lua	Wed Sep 12 23:58:01 2012 +0500
+++ b/mod_auth_external/mod_auth_external.lua	Thu Sep 13 00:08:29 2012 +0500
@@ -94,7 +94,7 @@
 end
 
 function new_external_provider(host)
-	local provider = { name = "external" };
+	local provider = {};
 
 	function provider.test_password(username, password)
 		return do_query("auth", username, password);
@@ -142,4 +142,4 @@
 	return provider;
 end
 
-module:add_item("auth-provider", new_external_provider(module.host));
+module:provides("auth", new_external_provider(module.host));