Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 11513:549c80feede6 0.11
mod_saslauth: Use a defined SASL error
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Mar 2021 16:16:54 +0100 |
parent | 11512:a2ba6c0ac8ec |
child | 11514:11186af62c87 |
comparison
equal
deleted
inserted
replaced
11512:a2ba6c0ac8ec | 11513:549c80feede6 |
---|---|
43 return reply; | 43 return reply; |
44 end | 44 end |
45 | 45 |
46 local function handle_status(session, status, ret, err_msg) | 46 local function handle_status(session, status, ret, err_msg) |
47 if not session.sasl_handler then | 47 if not session.sasl_handler then |
48 return "failure", "connection-timeout", "Connection gone"; | 48 return "failure", "temporary-auth-failure", "Connection gone"; |
49 end | 49 end |
50 if status == "failure" then | 50 if status == "failure" then |
51 module:fire_event("authentication-failure", { session = session, condition = ret, text = err_msg }); | 51 module:fire_event("authentication-failure", { session = session, condition = ret, text = err_msg }); |
52 session.sasl_handler = session.sasl_handler:clean_clone(); | 52 session.sasl_handler = session.sasl_handler:clean_clone(); |
53 elseif status == "success" then | 53 elseif status == "success" then |