diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-20 21:14:01 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-20 21:25:03 (GMT) |
commit | c84fb752cc881dfca9727b69fcdb3230830b7cc4 (patch) | |
tree | ede286a20ccf8daf109f2d1b03c610d6d97f9b8a /Swiften/SASL/PLAINClientAuthenticator.cpp | |
parent | 8149107ade43f9c9fff8fe134f1bce5b5e8b2234 (diff) | |
download | swift-contrib-c84fb752cc881dfca9727b69fcdb3230830b7cc4.zip swift-contrib-c84fb752cc881dfca9727b69fcdb3230830b7cc4.tar.bz2 |
Abstracting authenticators.
Diffstat (limited to 'Swiften/SASL/PLAINClientAuthenticator.cpp')
-rw-r--r-- | Swiften/SASL/PLAINClientAuthenticator.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Swiften/SASL/PLAINClientAuthenticator.cpp b/Swiften/SASL/PLAINClientAuthenticator.cpp new file mode 100644 index 0000000..8f88c3c --- /dev/null +++ b/Swiften/SASL/PLAINClientAuthenticator.cpp @@ -0,0 +1,16 @@ +#include "Swiften/SASL/PLAINClientAuthenticator.h" + +namespace Swift { + +PLAINClientAuthenticator::PLAINClientAuthenticator() : ClientAuthenticator("PLAIN") { +} + +ByteArray PLAINClientAuthenticator::getResponse() const { + return ByteArray(getAuthorizationID()) + '\0' + ByteArray(getAuthenticationID()) + '\0' + ByteArray(getPassword()); +} + +bool PLAINClientAuthenticator::setChallenge(const ByteArray&) { + return true; +} + +} |