aboutsummaryrefslogtreecommitdiffstats
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
commit807c896ee629a8f11342acd7c42a28dc82d4fe14 (patch)
treeb0ef213593ca6c92a04e2514f36d244de208dd39
parent6eaa0d2b866fdae600d37dd3c9f609546cd98d2a (diff)
downloadprosody-807c896ee629a8f11342acd7c42a28dc82d4fe14.tar.gz
prosody-807c896ee629a8f11342acd7c42a28dc82d4fe14.zip
mod_saslauth: Fire authentication-failure if make_authenticated() failed.
-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