diff mod_auth_internal_yubikey/mod_auth_internal_yubikey.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 f801ce6826d5
children 960007b0901e
line wrap: on
line diff
--- a/mod_auth_internal_yubikey/mod_auth_internal_yubikey.lua	Wed Sep 12 23:58:01 2012 +0500
+++ b/mod_auth_internal_yubikey/mod_auth_internal_yubikey.lua	Thu Sep 13 00:08:29 2012 +0500
@@ -46,7 +46,7 @@
 local global_yubikey_key = module:get_option_string("yubikey_key");
 
 function new_default_provider(host)
-	local provider = { name = "internal_yubikey" };
+	local provider = {};
 	log("debug", "initializing default authentication provider for host '%s'", host);
 
 	function provider.test_password(username, password)
@@ -121,7 +121,7 @@
 	return provider;
 end
 
-module:add_item("auth-provider", new_default_provider(module.host));
+module:provides("auth", new_default_provider(module.host));
 
 function module.command(arg)
 	local command = arg[1];