Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 4492:0a4781f165e3
mod_saslauth: "" ~= nil (thanks, Zash!)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Tue, 24 Jan 2012 14:57:53 -0800 |
parent | 4395:d322c4553f97 |
child | 4504:55b61221ecb8 |
comparison
equal
deleted
inserted
replaced
4491:381e0b874e6d | 4492:0a4781f165e3 |
---|---|
189 | 189 |
190 if not session.from_host then | 190 if not session.from_host then |
191 session.from_host = text; | 191 session.from_host = text; |
192 end | 192 end |
193 session.sends2s(build_reply("success")) | 193 session.sends2s(build_reply("success")) |
194 module:log("info", "Accepting SASL EXTERNAL identity from %s", text or session.from_host); | 194 |
195 s2s_make_authenticated(session, text or session.from_host) | 195 local domain = text ~= "" and text or session.from_host; |
196 module:log("info", "Accepting SASL EXTERNAL identity from %s", domain); | |
197 s2s_make_authenticated(session, domain); | |
196 session:reset_stream(); | 198 session:reset_stream(); |
197 return true | 199 return true |
198 end | 200 end |
199 | 201 |
200 module:hook("stanza/urn:ietf:params:xml:ns:xmpp-sasl:auth", function(event) | 202 module:hook("stanza/urn:ietf:params:xml:ns:xmpp-sasl:auth", function(event) |