comparison mod_sasl2_fast/mod_sasl2_fast.lua @ 5073:f158f18704c0

mod_sasl2_fast: Copy channel binding data state from original SASL handler
author Matthew Wild <mwild1@gmail.com>
date Sat, 15 Oct 2022 19:45:53 +0100
parents d41677929f68
children 1726050e9a4b
comparison
equal deleted inserted replaced
5072:d41677929f68 5073:f158f18704c0
101 local fast_sasl_handler = session.fast_sasl_handler; 101 local fast_sasl_handler = session.fast_sasl_handler;
102 local client_id = auth:get_child_attr("user-agent", nil, "id"); 102 local client_id = auth:get_child_attr("user-agent", nil, "id");
103 if fast_sasl_handler and client_id then 103 if fast_sasl_handler and client_id then
104 session.log("debug", "Client is authenticating using FAST"); 104 session.log("debug", "Client is authenticating using FAST");
105 fast_sasl_handler.profile._client_id = client_id; 105 fast_sasl_handler.profile._client_id = client_id;
106 fast_sasl_handler.profile.cb = session.sasl_handler.profile.cb;
107 fast_sasl_handler.userdata = session.sasl_handler.userdata;
106 session.sasl_handler = fast_sasl_handler; 108 session.sasl_handler = fast_sasl_handler;
107 else 109 else
108 session.log("warn", "Client asked to auth via FAST, but no SASL handler available"); 110 session.log("warn", "Client asked to auth via FAST, but no SASL handler available");
109 local failure = st.stanza("failure", { xmlns = xmlns_sasl2 }) 111 local failure = st.stanza("failure", { xmlns = xmlns_sasl2 })
110 :tag("malformed-request"):up() 112 :tag("malformed-request"):up()