Mercurial > prosody-hg
comparison plugins/mod_saslauth.lua @ 2242:ee6ac55a72d6
mod_saslauth: Allow relogins after failed SASL login.
| author | Tobias Markmann <tm@ayena.de> |
|---|---|
| date | Thu, 26 Nov 2009 23:18:26 +0100 |
| parents | 2dc746323de6 |
| children | 18079ede5b62 |
comparison
equal
deleted
inserted
replaced
| 2241:ac3bd7c42c8b | 2242:ee6ac55a72d6 |
|---|---|
| 73 return reply; | 73 return reply; |
| 74 end | 74 end |
| 75 | 75 |
| 76 local function handle_status(session, status) | 76 local function handle_status(session, status) |
| 77 if status == "failure" then | 77 if status == "failure" then |
| 78 session.sasl_handler = nil; | 78 session.sasl_handler = sesion.sasl_handler:clean_clone(); |
| 79 elseif status == "success" then | 79 elseif status == "success" then |
| 80 local username = nodeprep(session.sasl_handler.username); | 80 local username = nodeprep(session.sasl_handler.username); |
| 81 if not username then -- TODO move this to sessionmanager | 81 if not username then -- TODO move this to sessionmanager |
| 82 module:log("warn", "SASL succeeded but we didn't get a username!"); | 82 module:log("warn", "SASL succeeded but we didn't get a username!"); |
| 83 session.sasl_handler = nil; | 83 session.sasl_handler = nil; |
