Software /
code /
prosody
Diff
plugins/mod_dialback.lua @ 11526:15a3db955ad3
s2s et al.: Add counters for connection state transitions
author | Jonas Schäfer <jonas@wielicki.name> |
---|---|
date | Wed, 21 Apr 2021 17:11:58 +0200 |
parent | 10380:18685a5e362e |
child | 11560:3bbb1af92514 |
line wrap: on
line diff
--- a/plugins/mod_dialback.lua Sun Apr 18 12:35:16 2021 +0200 +++ b/plugins/mod_dialback.lua Wed Apr 21 17:11:58 2021 +0200 @@ -115,7 +115,7 @@ return elseif origin.cert_chain_status == "valid" and origin.cert_identity_status == "valid" then origin.sends2s(st.stanza("db:result", { to = from, from = to, id = attr.id, type = "valid" })); - module:fire_event("s2s-authenticated", { session = origin, host = from }); + module:fire_event("s2s-authenticated", { session = origin, host = from, mechanism = "dialback" }); return true; end end @@ -151,7 +151,7 @@ if dialback_verifying and attr.from == origin.to_host then local valid; if attr.type == "valid" then - module:fire_event("s2s-authenticated", { session = dialback_verifying, host = attr.from }); + module:fire_event("s2s-authenticated", { session = dialback_verifying, host = attr.from, mechanism = "dialback" }); valid = "valid"; else -- Warn the original connection that is was not verified successfully @@ -188,7 +188,7 @@ return true; end if stanza.attr.type == "valid" then - module:fire_event("s2s-authenticated", { session = origin, host = attr.from }); + module:fire_event("s2s-authenticated", { session = origin, host = attr.from, mechanism = "dialback" }); else origin:close("not-authorized", "dialback authentication failed"); end