aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_saslauth.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2008-11-16 00:25:28 +0500
committerWaqas Hussain <waqas20@gmail.com>2008-11-16 00:25:28 +0500
commit1b6b09a27d981017e4678235f54b6871a6dde7ca (patch)
tree05d7b4b1fcade75284300d8bd36568d705dfd305 /plugins/mod_saslauth.lua
parent9245e20027736cfdd2d53fa78502f25fe4205eb8 (diff)
downloadprosody-1b6b09a27d981017e4678235f54b6871a6dde7ca.tar.gz
prosody-1b6b09a27d981017e4678235f54b6871a6dde7ca.zip
Set username on SASL success
Diffstat (limited to 'plugins/mod_saslauth.lua')
-rw-r--r--plugins/mod_saslauth.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua
index 75af5eb6..24b19cfb 100644
--- a/plugins/mod_saslauth.lua
+++ b/plugins/mod_saslauth.lua
@@ -34,6 +34,8 @@ local function handle_status(session, status)
if status == "failure" then
session.sasl_handler = nil;
elseif status == "success" then
+ if not session.sasl_handler.username then error("SASL succeeded but we didn't get a username!"); end -- TODO move this to sessionmanager
+ sessionmanager.make_authenticated(session, session.sasl_handler.username);
session.sasl_handler = nil;
session:reset_stream();
end