diff options
author | Kim Alvefur <zash@zash.se> | 2012-02-12 15:05:31 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-02-12 15:05:31 +0100 |
commit | 6eaa0d2b866fdae600d37dd3c9f609546cd98d2a (patch) | |
tree | d80930ce9553cd92c8868e06db60e81eaaa59e8c /plugins | |
parent | fa30c62a6abcead910e0ea85529a0225d7a16e41 (diff) | |
download | prosody-6eaa0d2b866fdae600d37dd3c9f609546cd98d2a.tar.gz prosody-6eaa0d2b866fdae600d37dd3c9f609546cd98d2a.zip |
mod_saslauth: Move authentication-success event to after session has been made authenticated.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_saslauth.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index 58655a24..49987f84 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -51,11 +51,11 @@ local function handle_status(session, status, ret, err_msg) 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); if ok then + module:fire_event("authentication-success", { session = session }); session.sasl_handler = nil; session:reset_stream(); else |