diff options
Diffstat (limited to 'Swiften/SASL/ClientAuthenticator.h')
-rw-r--r-- | Swiften/SASL/ClientAuthenticator.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Swiften/SASL/ClientAuthenticator.h b/Swiften/SASL/ClientAuthenticator.h index 33db75f..8710ac8 100644 --- a/Swiften/SASL/ClientAuthenticator.h +++ b/Swiften/SASL/ClientAuthenticator.h @@ -7,9 +7,11 @@ #pragma once #include <boost/optional.hpp> - #include <string> -#include "Swiften/Base/ByteArray.h" +#include <vector> + +#include <Swiften/Base/SafeByteArray.h> +#include <Swiften/Base/ByteArray.h> namespace Swift { class ClientAuthenticator { @@ -21,13 +23,13 @@ namespace Swift { return name; } - void setCredentials(const std::string& authcid, const std::string& password, const std::string& authzid = std::string()) { + void setCredentials(const std::string& authcid, const SafeByteArray& password, const std::string& authzid = std::string()) { this->authcid = authcid; this->password = password; this->authzid = authzid; } - virtual boost::optional<ByteArray> getResponse() const = 0; + virtual boost::optional<SafeByteArray> getResponse() const = 0; virtual bool setChallenge(const boost::optional<ByteArray>&) = 0; const std::string& getAuthenticationID() const { @@ -38,14 +40,14 @@ namespace Swift { return authzid; } - const std::string& getPassword() const { + const SafeByteArray& getPassword() const { return password; } private: std::string name; std::string authcid; - std::string password; + SafeByteArray password; std::string authzid; }; } |