Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 4505:b1e10c327d66
mod_saslauth: Fire authentication-failure if make_authenticated() failed.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 12 Feb 2012 15:08:12 +0100 |
parent | 4504:55b61221ecb8 |
child | 4506:6643c9753453 |
comparison
equal
deleted
inserted
replaced
4504:55b61221ecb8 | 4505:b1e10c327d66 |
---|---|
58 module:fire_event("authentication-success", { session = session }); | 58 module:fire_event("authentication-success", { session = session }); |
59 session.sasl_handler = nil; | 59 session.sasl_handler = nil; |
60 session:reset_stream(); | 60 session:reset_stream(); |
61 else | 61 else |
62 module:log("warn", "SASL succeeded but username was invalid"); | 62 module:log("warn", "SASL succeeded but username was invalid"); |
63 module:fire_event("authentication-failure", { session = session, condition = "not-authorized", text = err }); | |
63 session.sasl_handler = session.sasl_handler:clean_clone(); | 64 session.sasl_handler = session.sasl_handler:clean_clone(); |
64 return "failure", "not-authorized", "User authenticated successfully, but username was invalid"; | 65 return "failure", "not-authorized", "User authenticated successfully, but username was invalid"; |
65 end | 66 end |
66 end | 67 end |
67 return status, ret, err_msg; | 68 return status, ret, err_msg; |