aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_auth_internal_plain.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2014-04-02 17:41:38 +0100
committerMatthew Wild <mwild1@gmail.com>2014-04-02 17:41:38 +0100
commit27b4049481f29dcac2d6093c40ad7e8bf1ea8899 (patch)
tree39ca42dddf3935546a0c3c37b2e2456a554899f1 /plugins/mod_auth_internal_plain.lua
parentae885de6a2f36eacd6085e7582e5019882208d23 (diff)
parent8c0d996be4f47b77a02668474d3d8a0a41bd0f98 (diff)
downloadprosody-27b4049481f29dcac2d6093c40ad7e8bf1ea8899.tar.gz
prosody-27b4049481f29dcac2d6093c40ad7e8bf1ea8899.zip
Merge 0.9->0.10
Diffstat (limited to 'plugins/mod_auth_internal_plain.lua')
-rw-r--r--plugins/mod_auth_internal_plain.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/mod_auth_internal_plain.lua b/plugins/mod_auth_internal_plain.lua
index d226fdbe..db528432 100644
--- a/plugins/mod_auth_internal_plain.lua
+++ b/plugins/mod_auth_internal_plain.lua
@@ -16,10 +16,9 @@ local accounts = module:open_store("accounts");
-- define auth provider
local provider = {};
-log("debug", "initializing internal_plain authentication provider for host '%s'", host);
function provider.test_password(username, password)
- log("debug", "test password for user %s at host %s", username, host);
+ log("debug", "test password for user '%s'", username);
local credentials = accounts:get(username) or {};
if password == credentials.password then
@@ -30,11 +29,12 @@ function provider.test_password(username, password)
end
function provider.get_password(username)
- log("debug", "get_password for username '%s' at host '%s'", username, host);
+ log("debug", "get_password for username '%s'", username);
return (accounts:get(username) or {}).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.password = password;
@@ -46,7 +46,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;
@@ -76,6 +76,6 @@ function provider.get_sasl_handler()
};
return new_sasl(host, getpass_authentication_profile);
end
-
+
module:provides("auth", provider);