Comparison

plugins/mod_auth_anonymous.lua @ 5117:2c7e1ce8f482

mod_auth_*: Use module:provides().
author Waqas Hussain <waqas20@gmail.com>
date Wed, 12 Sep 2012 21:41:51 +0500
parent 5115:3939960b3c07
child 5229:5566236f363f
comparison
equal deleted inserted replaced
5116:5f9066db1b4d 5117:2c7e1ce8f482
8 8
9 local new_sasl = require "util.sasl".new; 9 local new_sasl = require "util.sasl".new;
10 local datamanager = require "util.datamanager"; 10 local datamanager = require "util.datamanager";
11 11
12 -- define auth provider 12 -- define auth provider
13 local provider = { name = "anonymous" }; 13 local provider = {};
14 14
15 function provider.test_password(username, password) 15 function provider.test_password(username, password)
16 return nil, "Password based auth not supported."; 16 return nil, "Password based auth not supported.";
17 end 17 end
18 18
60 end 60 end
61 function module.unload() 61 function module.unload()
62 datamanager.remove_callback(dm_callback); 62 datamanager.remove_callback(dm_callback);
63 end 63 end
64 64
65 module:add_item("auth-provider", provider); 65 module:provides("auth", provider);
66 66