Software /
code /
prosody-modules
Comparison
mod_sasl2/mod_sasl2.lua @ 5020:6a36dae4a88d
mod_sasl2: Return true to indicate challenge was handled successfully
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 28 Aug 2022 11:18:10 +0100 |
parent | 5019:c83ce822f105 |
child | 5021:f62b091b1c81 |
comparison
equal
deleted
inserted
replaced
5019:c83ce822f105 | 5020:6a36dae4a88d |
---|---|
81 | 81 |
82 module:hook("sasl2/c2s/challenge", function (event) | 82 module:hook("sasl2/c2s/challenge", function (event) |
83 local session = event.session; | 83 local session = event.session; |
84 session.send(st.stanza("challenge", { xmlns = xmlns_sasl2 }) | 84 session.send(st.stanza("challenge", { xmlns = xmlns_sasl2 }) |
85 :text(base64.encode(event.message))); | 85 :text(base64.encode(event.message))); |
86 return true; | |
86 end); | 87 end); |
87 | 88 |
88 module:hook("sasl2/c2s/success", function (event) | 89 module:hook("sasl2/c2s/success", function (event) |
89 local session = event.session | 90 local session = event.session |
90 local ok, err = sm_make_authenticated(session, session.sasl_handler.username); | 91 local ok, err = sm_make_authenticated(session, session.sasl_handler.username); |