summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Client/ClientSession.cpp')
-rw-r--r--Swiften/Client/ClientSession.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp
index e90d325..7fdb8ac 100644
--- a/Swiften/Client/ClientSession.cpp
+++ b/Swiften/Client/ClientSession.cpp
@@ -7,6 +7,9 @@
#include "Swiften/Client/ClientSession.h"
#include <boost/bind.hpp>
+#include <boost/uuid/uuid.hpp>
+#include <boost/uuid/uuid_io.hpp>
+#include <boost/uuid/uuid_generators.hpp>
#include "Swiften/Elements/ProtocolHeader.h"
#include "Swiften/Elements/StreamFeatures.h"
@@ -98,7 +101,9 @@ void ClientSession::handleElement(boost::shared_ptr<Element> element) {
}
else if (streamFeatures->hasAuthenticationMechanism("SCRAM-SHA-1")) {
// FIXME: Use a real nonce
- authenticator = new SCRAMSHA1ClientAuthenticator("ClientNonce");
+ std::ostringstream s;
+ s << boost::uuids::random_generator()();
+ authenticator = new SCRAMSHA1ClientAuthenticator(s.str());
state = WaitingForCredentials;
onNeedCredentials();
}