summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-06-18 19:00:13 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-06-18 19:00:13 (GMT)
commit6080dd4915801b45598268c805b62aa6c723a3a3 (patch)
tree56ab5acd5ce2e354eff3a276f5acf87e8da0571f /Swiften/SASL/EXTERNALClientAuthenticator.cpp
parent7108ff51d73e4e0b38ab2acd139dca90ff4218f4 (diff)
downloadswift-6080dd4915801b45598268c805b62aa6c723a3a3.zip
swift-6080dd4915801b45598268c805b62aa6c723a3a3.tar.bz2
Handle unexpected challenges.
Resolves: #1132
Diffstat (limited to 'Swiften/SASL/EXTERNALClientAuthenticator.cpp')
-rw-r--r--Swiften/SASL/EXTERNALClientAuthenticator.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/Swiften/SASL/EXTERNALClientAuthenticator.cpp b/Swiften/SASL/EXTERNALClientAuthenticator.cpp
new file mode 100644
index 0000000..a3016d1
--- /dev/null
+++ b/Swiften/SASL/EXTERNALClientAuthenticator.cpp
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2012 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#include <Swiften/SASL/EXTERNALClientAuthenticator.h>
+
+namespace Swift {
+
+EXTERNALClientAuthenticator::EXTERNALClientAuthenticator() : ClientAuthenticator("EXTERNAL"), finished(false) {
+}
+
+boost::optional<SafeByteArray> EXTERNALClientAuthenticator::getResponse() const {
+ return boost::optional<SafeByteArray>();
+}
+
+bool EXTERNALClientAuthenticator::setChallenge(const boost::optional<ByteArray>&) {
+ if (finished) {
+ return false;
+ }
+ finished = true;
+ return true;
+}
+
+}