Software /
code /
prosody
Diff
plugins/mod_saslauth.lua @ 5362:612467e263af
s2smanager, mod_s2s, mod_dialback, mod_saslauth: Move s2smanager.make_authenticated() to mod_s2s, and plugins now signal authentication via the s2s-authenticated event
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 22 Mar 2013 14:18:23 +0000 |
parent | 5351:901ed253bbf7 |
child | 5535:0df0afc041d7 |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Fri Mar 22 11:24:54 2013 +0000 +++ b/plugins/mod_saslauth.lua Fri Mar 22 14:18:23 2013 +0000 @@ -11,7 +11,6 @@ local st = require "util.stanza"; local sm_bind_resource = require "core.sessionmanager".bind_resource; local sm_make_authenticated = require "core.sessionmanager".make_authenticated; -local s2s_make_authenticated = require "core.s2smanager".make_authenticated; local base64 = require "util.encodings".base64; local cert_verify_identity = require "util.x509".verify_identity; @@ -90,7 +89,7 @@ session:reset_stream(); session:open_stream(); - s2s_make_authenticated(session, session.to_host); + module:fire_event("s2s-authenticated", { session = session, host = session.to_host }); return true; end) @@ -187,7 +186,7 @@ local domain = text ~= "" and text or session.from_host; module:log("info", "Accepting SASL EXTERNAL identity from %s", domain); - s2s_make_authenticated(session, domain); + module:fire_event("s2s-authenticated", { session = session, host = domain }); session:reset_stream(); return true end