Comparison

mod_auth_sql/mod_auth_sql.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
parent 500:bd08727378be
child 843:cdc67f4efde2
comparison
equal deleted inserted replaced
813:2469f779b3f7 814:881ec9919144
79 end 79 end
80 end 80 end
81 end 81 end
82 82
83 83
84 provider = { name = "sql" }; 84 provider = {};
85 85
86 function provider.test_password(username, password) 86 function provider.test_password(username, password)
87 return password and get_password(username) == password; 87 return password and get_password(username) == password;
88 end 88 end
89 function provider.get_password(username) 89 function provider.get_password(username)
112 end 112 end
113 }; 113 };
114 return new_sasl(module.host, profile); 114 return new_sasl(module.host, profile);
115 end 115 end
116 116
117 module:add_item("auth-provider", provider); 117 module:provides("auth", provider);