aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-08-10 20:19:40 +0200
committerKim Alvefur <zash@zash.se>2013-08-10 20:19:40 +0200
commit81c7d18ca92bebd67ce59e703338e923e6bb0691 (patch)
tree2e20ccd816df124c9b8b805f4462cda17905d4d2
parent4488aeb3eb06cc953ff18392b0c2232db03919b2 (diff)
downloadprosody-81c7d18ca92bebd67ce59e703338e923e6bb0691.tar.gz
prosody-81c7d18ca92bebd67ce59e703338e923e6bb0691.zip
mod_auth_internal_hashed: Log calls to provider methods and be consistent with mod_auth_internal_plain
-rw-r--r--plugins/mod_auth_internal_hashed.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua
index ff0c7631..fb87bb9f 100644
--- a/plugins/mod_auth_internal_hashed.lua
+++ b/plugins/mod_auth_internal_hashed.lua
@@ -13,6 +13,7 @@ local generate_uuid = require "util.uuid".generate;
local new_sasl = require "util.sasl".new;
local log = module._log;
+local host = module.host;
local accounts = module:open_store("accounts");
@@ -40,11 +41,11 @@ end
-- Default; can be set per-user
local iteration_count = 4096;
-local host = module.host;
-- define auth provider
local provider = {};
function provider.test_password(username, password)
+ log("debug", "test password for user '%s'", username);
local credentials = accounts:get(username) or {};
if credentials.password ~= nil and string.len(credentials.password) ~= 0 then
@@ -76,6 +77,7 @@ function provider.test_password(username, password)
end
function provider.set_password(username, password)
+ log("debug", "set_password for username '%s'", username);
local account = accounts:get(username);
if account then
account.salt = account.salt or generate_uuid();
@@ -96,7 +98,7 @@ end
function provider.user_exists(username)
local account = accounts:get(username);
if not account then
- log("debug", "account not found for username '%s' at host '%s'", username, host);
+ log("debug", "account not found for username '%s'", username);
return nil, "Auth failed. Invalid username";
end
return true;