mod_sasl2_fast/mod_sasl2_fast.lua
changeset 5077 f158f18704c0
parent 5076 d41677929f68
child 5078 1726050e9a4b
equal deleted inserted replaced
5076:d41677929f68 5077: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()