Software /
code /
prosody
Comparison
plugins/mod_auth_internal_hashed.lua @ 5117:2c7e1ce8f482
mod_auth_*: Use module:provides().
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 12 Sep 2012 21:41:51 +0500 |
parent | 5116:5f9066db1b4d |
child | 5156:6b08c922a2e4 |
comparison
equal
deleted
inserted
replaced
5116:5f9066db1b4d | 5117:2c7e1ce8f482 |
---|---|
39 -- Default; can be set per-user | 39 -- Default; can be set per-user |
40 local iteration_count = 4096; | 40 local iteration_count = 4096; |
41 | 41 |
42 local host = module.host; | 42 local host = module.host; |
43 -- define auth provider | 43 -- define auth provider |
44 local provider = { name = "internal_hashed" }; | 44 local provider = {}; |
45 log("debug", "initializing internal_hashed authentication provider for host '%s'", host); | 45 log("debug", "initializing internal_hashed authentication provider for host '%s'", host); |
46 | 46 |
47 function provider.test_password(username, password) | 47 function provider.test_password(username, password) |
48 local credentials = datamanager.load(username, host, "accounts") or {}; | 48 local credentials = datamanager.load(username, host, "accounts") or {}; |
49 | 49 |
143 end | 143 end |
144 }; | 144 }; |
145 return new_sasl(host, testpass_authentication_profile); | 145 return new_sasl(host, testpass_authentication_profile); |
146 end | 146 end |
147 | 147 |
148 module:add_item("auth-provider", provider); | 148 module:provides("auth", provider); |
149 | 149 |