Mercurial > prosody-modules
comparison mod_sasl2_fast/mod_sasl2_fast.lua @ 5137:471cbb583a1d
mod_sasl2_fast: Add some comments
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 10 Jan 2023 15:45:25 +0000 |
parents | 745c7f4cca40 |
children | 0566a71a7076 |
comparison
equal
deleted
inserted
replaced
5136:67b2c982bea2 | 5137:471cbb583a1d |
---|---|
100 username = jid.node(event.stream.from); | 100 username = jid.node(event.stream.from); |
101 if not username then return; end | 101 if not username then return; end |
102 end | 102 end |
103 local sasl_handler = get_sasl_handler(username); | 103 local sasl_handler = get_sasl_handler(username); |
104 if not sasl_handler then return; end | 104 if not sasl_handler then return; end |
105 -- Copy channel binding info from primary SASL handler | |
105 sasl_handler.profile.cb = session.sasl_handler.profile.cb; | 106 sasl_handler.profile.cb = session.sasl_handler.profile.cb; |
106 sasl_handler.userdata = session.sasl_handler.userdata; | 107 sasl_handler.userdata = session.sasl_handler.userdata; |
108 -- Store this handler, in case we later want to use it for authenticating | |
107 session.fast_sasl_handler = sasl_handler; | 109 session.fast_sasl_handler = sasl_handler; |
108 local fast = st.stanza("fast", { xmlns = xmlns_fast }); | 110 local fast = st.stanza("fast", { xmlns = xmlns_fast }); |
109 for mech in pairs(sasl_handler:mechanisms()) do | 111 for mech in pairs(sasl_handler:mechanisms()) do |
110 fast:text_tag("mechanism", mech); | 112 fast:text_tag("mechanism", mech); |
111 end | 113 end |