Software /
code /
prosody
Comparison
plugins/mod_saslauth.lua @ 12726:9f100ab9ffdf
mod_saslauth: Put <sasl-channel-binding> in stream:features per XEP-0440 0.4.0
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 21 Sep 2022 15:00:06 +0100 |
parent | 12721:7830db3c38c3 |
child | 12912:44a78985471f |
comparison
equal
deleted
inserted
replaced
12725:12ced5db29b2 | 12726:9f100ab9ffdf |
---|---|
319 if not usable_mechanisms:empty() then | 319 if not usable_mechanisms:empty() then |
320 log("debug", "Offering usable mechanisms: %s", usable_mechanisms); | 320 log("debug", "Offering usable mechanisms: %s", usable_mechanisms); |
321 for mechanism in usable_mechanisms do | 321 for mechanism in usable_mechanisms do |
322 mechanisms:tag("mechanism"):text(mechanism):up(); | 322 mechanisms:tag("mechanism"):text(mechanism):up(); |
323 end | 323 end |
324 features:add_child(mechanisms); | |
324 if not channel_bindings:empty() then | 325 if not channel_bindings:empty() then |
325 -- XXX XEP-0440 is Experimental | 326 -- XXX XEP-0440 is Experimental |
326 mechanisms:tag("sasl-channel-binding", {xmlns='urn:xmpp:sasl-cb:0'}) | 327 features:tag("sasl-channel-binding", {xmlns='urn:xmpp:sasl-cb:0'}) |
327 for channel_binding in channel_bindings do | 328 for channel_binding in channel_bindings do |
328 mechanisms:tag("channel-binding", {type=channel_binding}):up() | 329 features:tag("channel-binding", {type=channel_binding}):up() |
329 end | 330 end |
330 mechanisms:up(); | 331 features:up(); |
331 end | 332 end |
332 features:add_child(mechanisms); | |
333 return; | 333 return; |
334 end | 334 end |
335 | 335 |
336 local authmod = module:get_option_string("authentication", "internal_hashed"); | 336 local authmod = module:get_option_string("authentication", "internal_hashed"); |
337 if available_mechanisms:empty() then | 337 if available_mechanisms:empty() then |