aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_dialback.lua
diff options
context:
space:
mode:
authorJonas Schäfer <jonas@wielicki.name>2021-04-21 17:11:58 +0200
committerJonas Schäfer <jonas@wielicki.name>2021-04-21 17:11:58 +0200
commitf18e33228d3ca99be0c45fc1084ccd4f27d3ef87 (patch)
tree988e44ab0e449ac7922be1d739cca6517217d9a0 /plugins/mod_dialback.lua
parentb027ddcbfc437fb8b64337ff99e7d6cab8ba5de2 (diff)
downloadprosody-f18e33228d3ca99be0c45fc1084ccd4f27d3ef87.tar.gz
prosody-f18e33228d3ca99be0c45fc1084ccd4f27d3ef87.zip
s2s et al.: Add counters for connection state transitions
Diffstat (limited to 'plugins/mod_dialback.lua')
-rw-r--r--plugins/mod_dialback.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua
index f580d948..7396e07e 100644
--- a/plugins/mod_dialback.lua
+++ b/plugins/mod_dialback.lua
@@ -115,7 +115,7 @@ module:hook("stanza/jabber:server:dialback:result", function(event)
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 @@ module:hook("stanza/jabber:server:dialback:verify", function(event)
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 @@ module:hook("stanza/jabber:server:dialback:result", function(event)
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