diff options
author | louiz’ <louiz@louiz.org> | 2020-06-14 22:54:42 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2020-06-15 00:18:51 +0200 |
commit | 2e1ddeb6547e140e9651231fedcd00e8ee4b1ccd (patch) | |
tree | 8b61842eaa892fde2b5679672de572a9ff7a4e47 /src/xmpp | |
parent | 655bc344d47bc79e500a351c2953f6b5003f40ec (diff) | |
download | biboumi-2e1ddeb6547e140e9651231fedcd00e8ee4b1ccd.tar.gz biboumi-2e1ddeb6547e140e9651231fedcd00e8ee4b1ccd.tar.bz2 biboumi-2e1ddeb6547e140e9651231fedcd00e8ee4b1ccd.tar.xz biboumi-2e1ddeb6547e140e9651231fedcd00e8ee4b1ccd.zip |
Implement SASL plain authentication
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/biboumi_adhoc_commands.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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 @@ -326,6 +326,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<Database::SaslPassword>().empty()) + { + XmlSubNode value(field, "value"); + value.set_inner(options.col<Database::SaslPassword>()); + } + } + + { XmlSubNode pass(x, "field"); pass["var"] = "pass"; pass["type"] = "text-private"; @@ -482,6 +495,9 @@ void ConfigureIrcServerStep2(XmppComponent& xmpp_component, AdhocSession& sessio else if (field->get_tag("var") == "nick" && value) options.col<Database::Nick>() = value->get_inner(); + else if (field->get_tag("var") == "sasl_password" && value) + options.col<Database::SaslPassword>() = value->get_inner(); + else if (field->get_tag("var") == "pass" && value) options.col<Database::Pass>() = value->get_inner(); |