Software /
code /
verse
Comparison
plugins/sasl.lua @ 302:0c83cb476246
plugins.sasl: Collect text message on SASL failure
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 28 May 2012 17:32:38 +0200 |
parent | 197:7e98cf2c1d8d |
child | 315:3742107e2505 |
comparison
equal
deleted
inserted
replaced
301:ffa55bc9396f | 302:0c83cb476246 |
---|---|
22 if sasl_stanza.name == "success" then | 22 if sasl_stanza.name == "success" then |
23 stream.authenticated = true; | 23 stream.authenticated = true; |
24 stream:event("authentication-success"); | 24 stream:event("authentication-success"); |
25 elseif sasl_stanza.name == "failure" then | 25 elseif sasl_stanza.name == "failure" then |
26 local err = sasl_stanza.tags[1]; | 26 local err = sasl_stanza.tags[1]; |
27 stream:event("authentication-failure", { condition = err.name }); | 27 local text = sasl_stanza:get_child_text("text"); |
28 stream:event("authentication-failure", { condition = err.name, text = text }); | |
28 end | 29 end |
29 stream:reopen(); | 30 stream:reopen(); |
30 return true; | 31 return true; |
31 end | 32 end |
32 | 33 |