projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util.json: New, faster, stricter, more compliant JSON decoder. Now returns nil,err...
[prosody.git]
/
plugins
/
mod_dialback.lua
diff --git
a/plugins/mod_dialback.lua
b/plugins/mod_dialback.lua
index b2f846034adb46b7005cac817de12db569e43801..9dcb0ed53112d73f9e4d4460f1c17260b68be2d0 100644
(file)
--- a/
plugins/mod_dialback.lua
+++ b/
plugins/mod_dialback.lua
@@
-7,7
+7,6
@@
--
local hosts = _G.hosts;
--
local hosts = _G.hosts;
-local s2s_make_authenticated = require "core.s2smanager".make_authenticated;
local log = module._log;
local log = module._log;
@@
-110,7
+109,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
if dialback_verifying and attr.from == origin.to_host then
local valid;
if attr.type == "valid" then
-
s2s_make_authenticated(dialback_verifying, attr.from
);
+
module:fire_event("s2s-authenticated", { session = dialback_verifying, host = attr.from }
);
valid = "valid";
else
-- Warn the original connection that is was not verified successfully
valid = "valid";
else
-- Warn the original connection that is was not verified successfully
@@
-146,7
+145,7
@@
module:hook("stanza/jabber:server:dialback:result", function(event)
return true;
end
if stanza.attr.type == "valid" then
return true;
end
if stanza.attr.type == "valid" then
-
s2s_make_authenticated(origin, attr.from
);
+
module:fire_event("s2s-authenticated", { session = origin, host = attr.from }
);
else
origin:close("not-authorized", "dialback authentication failed");
end
else
origin:close("not-authorized", "dialback authentication failed");
end
@@
-170,7
+169,7
@@
module:hook_stanza(xmlns_stream, "features", function (origin, stanza)
end
end, 100);
end
end, 100);
-module:hook("s2s-authenticate-legacy", function (event)
+module:hook("s2s
out
-authenticate-legacy", function (event)
module:log("debug", "Initiating dialback...");
initiate_dialback(event.origin);
return true;
module:log("debug", "Initiating dialback...");
initiate_dialback(event.origin);
return true;