From 9168d631d5c266ee79c3112840423d4fca0c96dd Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Wed, 5 Sep 2012 15:28:18 +0200 Subject: Add support for X-OAUTH2 authentication for Google Talk. --- src/client/QXmppOutgoingClient.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/client/QXmppOutgoingClient.cpp') diff --git a/src/client/QXmppOutgoingClient.cpp b/src/client/QXmppOutgoingClient.cpp index 6f84d090..d6b41202 100644 --- a/src/client/QXmppOutgoingClient.cpp +++ b/src/client/QXmppOutgoingClient.cpp @@ -370,7 +370,7 @@ void QXmppOutgoingClient::handleStanza(const QDomElement &nodeRecv) if (saslAvailable && configuration().useSASLAuthentication()) { // supported and preferred SASL auth mechanisms - const QStringList supportedMechanisms = QXmppSaslClient::availableMechanisms(); + QStringList supportedMechanisms = QXmppSaslClient::availableMechanisms(); const QString preferredMechanism = configuration().saslAuthMechanism(); // determine SASL Authentication mechanism to use @@ -405,6 +405,9 @@ void QXmppOutgoingClient::handleStanza(const QDomElement &nodeRecv) d->saslClient->setPassword(configuration().facebookAccessToken()); } else if (d->saslClient->mechanism() == "X-MESSENGER-OAUTH2") { d->saslClient->setPassword(configuration().windowsLiveAccessToken()); + } else if (d->saslClient->mechanism() == "X-OAUTH2") { + d->saslClient->setUsername(configuration().user()); + d->saslClient->setPassword(configuration().googleAccessToken()); } else { d->saslClient->setUsername(configuration().user()); d->saslClient->setPassword(configuration().password()); -- cgit v1.2.3