aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-02-12 15:08:12 +0100
committerKim Alvefur <zash@zash.se>2012-02-12 15:08:12 +0100
commit1df83a16325b9416cd9a22cc3b7a39f8c92ad3ad (patch)
treeb0ef213593ca6c92a04e2514f36d244de208dd39 /plugins
parentf672faa0165f7288cb5e1dc71c76430f1c15b110 (diff)
downloadprosody-1df83a16325b9416cd9a22cc3b7a39f8c92ad3ad.tar.gz
prosody-1df83a16325b9416cd9a22cc3b7a39f8c92ad3ad.zip
mod_saslauth: Fire authentication-failure if make_authenticated() failed.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_saslauth.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 49987f84..2b23e33c 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -60,6 +60,7 @@ local function handle_status(session, status, ret, err_msg)
session:reset_stream();
else
module:log("warn", "SASL succeeded but username was invalid");
+ module:fire_event("authentication-failure", { session = session, condition = "not-authorized", text = err });
session.sasl_handler = session.sasl_handler:clean_clone();
return "failure", "not-authorized", "User authenticated successfully, but username was invalid";
end