Comparison

plugins/mod_saslauth.lua @ 287:5c405d7b06bb

Set username on SASL success
author Waqas Hussain <waqas20@gmail.com>
date Sun, 16 Nov 2008 00:25:28 +0500
parent 284:4f540755260c
child 289:3c8a28c1f331
comparison
equal deleted inserted replaced
284:4f540755260c 287:5c405d7b06bb
32 32
33 local function handle_status(session, status) 33 local function handle_status(session, status)
34 if status == "failure" then 34 if status == "failure" then
35 session.sasl_handler = nil; 35 session.sasl_handler = nil;
36 elseif status == "success" then 36 elseif status == "success" then
37 if not session.sasl_handler.username then error("SASL succeeded but we didn't get a username!"); end -- TODO move this to sessionmanager
38 sessionmanager.make_authenticated(session, session.sasl_handler.username);
37 session.sasl_handler = nil; 39 session.sasl_handler = nil;
38 session:reset_stream(); 40 session:reset_stream();
39 end 41 end
40 end 42 end
41 43