From 2e1ddeb6547e140e9651231fedcd00e8ee4b1ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sun, 14 Jun 2020 22:54:42 +0200 Subject: Implement SASL plain authentication --- src/xmpp/biboumi_adhoc_commands.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/xmpp') diff --git a/src/xmpp/biboumi_adhoc_commands.cpp b/src/xmpp/biboumi_adhoc_commands.cpp index 113943c..99589e0 100644 --- a/src/xmpp/biboumi_adhoc_commands.cpp +++ b/src/xmpp/biboumi_adhoc_commands.cpp @@ -325,6 +325,19 @@ void ConfigureIrcServerStep1(XmppComponent&, AdhocSession& session, XmlNode& com } } + { + XmlSubNode field(x, "field"); + field["var"] = "sasl_password"; + field["type"] = "text-private"; + field["label"] = "SASL Password"; + set_desc(field, "Use it to authenticate with your nick."); + if (!options.col().empty()) + { + XmlSubNode value(field, "value"); + value.set_inner(options.col()); + } + } + { XmlSubNode pass(x, "field"); pass["var"] = "pass"; @@ -482,6 +495,9 @@ void ConfigureIrcServerStep2(XmppComponent& xmpp_component, AdhocSession& sessio else if (field->get_tag("var") == "nick" && value) options.col() = value->get_inner(); + else if (field->get_tag("var") == "sasl_password" && value) + options.col() = value->get_inner(); + else if (field->get_tag("var") == "pass" && value) options.col() = value->get_inner(); -- cgit v1.2.3