equal
deleted
inserted
replaced
85 module:hook_stanza(xmlns_sasl, "success", function (session, stanza) |
85 module:hook_stanza(xmlns_sasl, "success", function (session, stanza) |
86 if session.type ~= "s2sout_unauthed" or session.external_auth ~= "attempting" then return; end |
86 if session.type ~= "s2sout_unauthed" or session.external_auth ~= "attempting" then return; end |
87 module:log("debug", "SASL EXTERNAL with %s succeeded", session.to_host); |
87 module:log("debug", "SASL EXTERNAL with %s succeeded", session.to_host); |
88 session.external_auth = "succeeded" |
88 session.external_auth = "succeeded" |
89 session:reset_stream(); |
89 session:reset_stream(); |
90 session:open_stream(); |
90 session:open_stream(session.from_host, session.to_host); |
91 |
91 |
92 module:fire_event("s2s-authenticated", { session = session, host = session.to_host }); |
92 module:fire_event("s2s-authenticated", { session = session, host = session.to_host }); |
93 return true; |
93 return true; |
94 end) |
94 end) |
95 |
95 |