Diff

plugins/mod_saslauth.lua @ 288:dc53343af9ac

Set username in a SASL object.
author Tobias Markmann <tm@ayena.de>
date Sat, 15 Nov 2008 20:28:09 +0100
parent 286:7e4908d4bdf6
child 289:3c8a28c1f331
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua	Sat Nov 15 19:25:51 2008 +0100
+++ b/plugins/mod_saslauth.lua	Sat Nov 15 20:28:09 2008 +0100
@@ -7,6 +7,7 @@
 local usermanager_validate_credentials = require "core.usermanager".validate_credentials;
 local t_concat, t_insert = table.concat, table.insert;
 local tostring = tostring;
+local jid_split = require "util.jid".split
 
 local log = require "util.logger".init("mod_saslauth");
 
@@ -65,7 +66,9 @@
 	end
 	local status, ret = session.sasl_handler:feed(text);
 	handle_status(session, status);
-	session.send(build_reply(status, ret));
+	local s = build_reply(status, ret); 
+	log("debug", "sasl reply: "..tostring(s));
+	session.send(s);
 end
 
 add_handler("c2s_unauthed", "auth", xmlns_sasl,