Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 289:3c8a28c1f331
Merging with Waqas' code.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Sat, 15 Nov 2008 20:28:49 +0100 |
parent | 288:dc53343af9ac |
parent | 287:5c405d7b06bb |
child | 291:5672d2be1bf3 |
comparison
equal
deleted
inserted
replaced
288:dc53343af9ac | 289:3c8a28c1f331 |
---|---|
33 | 33 |
34 local function handle_status(session, status) | 34 local function handle_status(session, status) |
35 if status == "failure" then | 35 if status == "failure" then |
36 session.sasl_handler = nil; | 36 session.sasl_handler = nil; |
37 elseif status == "success" then | 37 elseif status == "success" then |
38 if not session.sasl_handler.username then error("SASL succeeded but we didn't get a username!"); end -- TODO move this to sessionmanager | |
39 sessionmanager.make_authenticated(session, session.sasl_handler.username); | |
38 session.sasl_handler = nil; | 40 session.sasl_handler = nil; |
39 session:reset_stream(); | 41 session:reset_stream(); |
40 end | 42 end |
41 end | 43 end |
42 | 44 |