diff options
author | Paul Aurich <paul@darkrain42.org> | 2010-11-21 21:10:43 -0800 |
---|---|---|
committer | Paul Aurich <paul@darkrain42.org> | 2010-11-21 21:10:43 -0800 |
commit | ef8bc026b469567751222992cf70ee19f9a754a7 (patch) | |
tree | 2d4fb8e18a5cc1e887aedebf5d2298d4744384ca /plugins/mod_dialback.lua | |
parent | bb78d91827c41f01a900b20c6c30531842f5ba08 (diff) | |
download | prosody-ef8bc026b469567751222992cf70ee19f9a754a7.tar.gz prosody-ef8bc026b469567751222992cf70ee19f9a754a7.zip |
s2s: SASL EXTERNAL
Diffstat (limited to 'plugins/mod_dialback.lua')
-rw-r--r-- | plugins/mod_dialback.lua | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua index e1fd5a42..a8923e27 100644 --- a/plugins/mod_dialback.lua +++ b/plugins/mod_dialback.lua @@ -132,9 +132,19 @@ module:hook("stanza/jabber:server:dialback:result", function(event) end end); +module:hook_stanza("urn:ietf:params:xml:ns:xmpp-sasl", "failure", function (origin, stanza) + if origin.external_auth == "failed" then + module:log("debug", "SASL EXTERNAL failed, falling back to dialback"); + s2s_initiate_dialback(origin); + return true; + end +end, 100); + module:hook_stanza(xmlns_stream, "features", function (origin, stanza) - s2s_initiate_dialback(origin); - return true; + if not origin.external_auth or origin.external_auth == "failed" then + s2s_initiate_dialback(origin); + return true; + end end, 100); -- Offer dialback to incoming hosts |