aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-01-04 17:12:28 +0000
committerMatthew Wild <mwild1@gmail.com>2011-01-04 17:12:28 +0000
commit2e28b24183d37ce48a61e6f1845f1eac8414e992 (patch)
tree3112772b9a0e422b72ab6573c242387bcc95d8bc /plugins
parent8854a71059c31bb0cc39d5945525735f5cf39694 (diff)
downloadprosody-2e28b24183d37ce48a61e6f1845f1eac8414e992.tar.gz
prosody-2e28b24183d37ce48a61e6f1845f1eac8414e992.zip
mod_auth_internal_*: Support for delete_user method
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_auth_internal_hashed.lua4
-rw-r--r--plugins/mod_auth_internal_plain.lua4
2 files changed, 8 insertions, 0 deletions
diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua
index ec8da9ab..3ce8c076 100644
--- a/plugins/mod_auth_internal_hashed.lua
+++ b/plugins/mod_auth_internal_hashed.lua
@@ -135,6 +135,10 @@ function new_hashpass_provider(host)
return datamanager.store(username, host, "accounts", {stored_key = stored_key_hex, server_key = server_key_hex, salt = salt, iteration_count = iteration_count});
end
+ function provider.delete_user(username)
+ return datamanager.store(username, host, "accounts", nil);
+ end
+
function provider.get_sasl_handler()
local realm = module:get_option("sasl_realm") or module.host;
local testpass_authentication_profile = {
diff --git a/plugins/mod_auth_internal_plain.lua b/plugins/mod_auth_internal_plain.lua
index 3721781b..ccaf8381 100644
--- a/plugins/mod_auth_internal_plain.lua
+++ b/plugins/mod_auth_internal_plain.lua
@@ -62,6 +62,10 @@ function new_default_provider(host)
function provider.create_user(username, password)
return datamanager.store(username, host, "accounts", {password = password});
end
+
+ function provider.delete_user(username)
+ return datamanager.store(username, host, "accounts", nil);
+ end
function provider.get_sasl_handler()
local realm = module:get_option("sasl_realm") or module.host;