diff options
author | Matthew Wild <mwild1@gmail.com> | 2011-08-29 12:01:42 -0400 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2011-08-29 12:01:42 -0400 |
commit | b17dbe08c55d3f6ff76ea55c0742d903f47288eb (patch) | |
tree | fae44e707320a3687e086ef54f315ce8c95b5c40 /plugins | |
parent | f34c346ad0677b1dc9e3e5ea9cd3f242237f1a0c (diff) | |
download | prosody-b17dbe08c55d3f6ff76ea55c0742d903f47288eb.tar.gz prosody-b17dbe08c55d3f6ff76ea55c0742d903f47288eb.zip |
mod_saslauth: Fire authentication-success and authentication-failure events (thanks scitor)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_saslauth.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index 1c0d0673..8fd71ff3 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -48,8 +48,10 @@ end local function handle_status(session, status, ret, err_msg) if status == "failure" then + module:fire_event("authentication-failure", { session = session, condition = ret, text = err_msg }); session.sasl_handler = session.sasl_handler:clean_clone(); elseif status == "success" then + module:fire_event("authentication-success", { session = session }); local username = nodeprep(session.sasl_handler.username); local ok, err = sm_make_authenticated(session, session.sasl_handler.username); |