# HG changeset patch # User Matthew Wild # Date 1314633702 14400 # Node ID 605045b77bc6df0787400ade147e1205647f6b97 # Parent a993a4a2ea0a73cdfa01b0231a6b0ea200717cb5 mod_saslauth: Fire authentication-success and authentication-failure events (thanks scitor) diff -r a993a4a2ea0a -r 605045b77bc6 plugins/mod_saslauth.lua --- 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);