aboutsummaryrefslogtreecommitdiff
path: root/src/client/QXmppOutgoingClient.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2013-03-09 15:16:29 +0100
committerJeremy Lainé <jeremy.laine@m4x.org>2013-03-09 15:16:29 +0100
commit05eda1dd322e338bf2931d5bf5f455af534356b1 (patch)
tree0ccb8b4aa573af2604ac99fe6f6eea9a8ecd12fe /src/client/QXmppOutgoingClient.cpp
parent5c9a346efe246c7ff225ea2dcb5ba705b69a2542 (diff)
downloadqxmpp-05eda1dd322e338bf2931d5bf5f455af534356b1.tar.gz
Disable Facebook / Google / Facebook specific mechanisms if we do not
have the corresponding credentials. Google recently changed their XMPP servers, and X-OAUTH2 is now listed before PLAIN. QXmpp was failing to connect to their servers.
Diffstat (limited to 'src/client/QXmppOutgoingClient.cpp')
-rw-r--r--src/client/QXmppOutgoingClient.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/QXmppOutgoingClient.cpp b/src/client/QXmppOutgoingClient.cpp
index bb6f0740..f9d7c7df 100644
--- a/src/client/QXmppOutgoingClient.cpp
+++ b/src/client/QXmppOutgoingClient.cpp
@@ -377,6 +377,12 @@ void QXmppOutgoingClient::handleStanza(const QDomElement &nodeRecv)
// supported and preferred SASL auth mechanisms
QStringList supportedMechanisms = QXmppSaslClient::availableMechanisms();
const QString preferredMechanism = configuration().saslAuthMechanism();
+ if (configuration().facebookAppId().isEmpty() || configuration().facebookAccessToken().isEmpty())
+ supportedMechanisms.removeAll("X-FACEBOOK-PLATFORM");
+ if (configuration().windowsLiveAccessToken().isEmpty())
+ supportedMechanisms.removeAll("X-MESSENGER-OAUTH2");
+ if (configuration().googleAccessToken().isEmpty())
+ supportedMechanisms.removeAll("X-OAUTH2");
// determine SASL Authentication mechanism to use
QStringList commonMechanisms;