summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Client/ClientSession.cpp')
-rw-r--r--Swiften/Client/ClientSession.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp
index f4c4a22..fb80754 100644
--- a/Swiften/Client/ClientSession.cpp
+++ b/Swiften/Client/ClientSession.cpp
@@ -77,18 +77,18 @@ void ClientSession::handleElement(boost::shared_ptr<Element> element) {
stream->writeElement(boost::shared_ptr<Element>(new AuthRequest("EXTERNAL", "")));
}
else {
finishSession(Error::TLSClientCertificateError);
}
}
- /*else if (streamFeatures->hasAuthenticationMechanism("SCRAM-SHA-1")) {
+ else if (streamFeatures->hasAuthenticationMechanism("SCRAM-SHA-1")) {
// FIXME: Use a real nonce
- authenticator = new SCRAMSHA1ClientAuthenticator(ByteArray("\x01\x02\x03\x04\x05\x06\x07\x08", 8));
+ authenticator = new SCRAMSHA1ClientAuthenticator("ClientNonce");
state = WaitingForCredentials;
onNeedCredentials();
- }*/
+ }
else if (streamFeatures->hasAuthenticationMechanism("PLAIN")) {
authenticator = new PLAINClientAuthenticator();
state = WaitingForCredentials;
onNeedCredentials();
}
else {
@@ -128,12 +128,13 @@ void ClientSession::handleElement(boost::shared_ptr<Element> element) {
}
else {
finishSession(Error::AuthenticationFailedError);
}
}
else if (dynamic_cast<AuthSuccess*>(element.get())) {
+ // TODO: Check success data with authenticator
checkState(Authenticating);
state = WaitingForStreamStart;
delete authenticator;
authenticator = NULL;
stream->resetXMPPParser();
sendStreamHeader();