comparison mod_sasl2_fast/mod_sasl2_fast.lua @ 5286:a91adc164566

mod_sasl2_fast: Add flag to FAST sasl_handler for easier identification Other code that looks at session.sasl_handler can now detect if a client used FAST to authenticate.
author Matthew Wild <mwild1@gmail.com>
date Wed, 29 Mar 2023 16:13:00 +0100
parents 8e1f1eb00b58
children 4834eaf24fc1
comparison
equal deleted inserted replaced
5285:8e1f1eb00b58 5286:a91adc164566
110 username = jid.node(event.stream.from); 110 username = jid.node(event.stream.from);
111 if not username then return; end 111 if not username then return; end
112 end 112 end
113 local sasl_handler = get_sasl_handler(username); 113 local sasl_handler = get_sasl_handler(username);
114 if not sasl_handler then return; end 114 if not sasl_handler then return; end
115 sasl_handler.fast_auth = true; -- For informational purposes
115 -- Copy channel binding info from primary SASL handler 116 -- Copy channel binding info from primary SASL handler
116 sasl_handler.profile.cb = session.sasl_handler.profile.cb; 117 sasl_handler.profile.cb = session.sasl_handler.profile.cb;
117 sasl_handler.userdata = session.sasl_handler.userdata; 118 sasl_handler.userdata = session.sasl_handler.userdata;
118 -- Store this handler, in case we later want to use it for authenticating 119 -- Store this handler, in case we later want to use it for authenticating
119 session.fast_sasl_handler = sasl_handler; 120 session.fast_sasl_handler = sasl_handler;