Software /
code /
prosody
Changeset
4361:605045b77bc6
mod_saslauth: Fire authentication-success and authentication-failure events (thanks scitor)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 29 Aug 2011 12:01:42 -0400 |
parents | 4360:a993a4a2ea0a |
children | 4362:851885cb332d |
files | plugins/mod_saslauth.lua |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Fri Aug 26 16:02:08 2011 +0500 +++ b/plugins/mod_saslauth.lua Mon Aug 29 12:01:42 2011 -0400 @@ -48,8 +48,10 @@ 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);