diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-09-05 15:28:18 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2012-09-05 15:28:18 +0200 |
| commit | 9168d631d5c266ee79c3112840423d4fca0c96dd (patch) | |
| tree | d5e9d67627ca46cb04eb63e06a50ffa7dc38aa7d /src/client/QXmppOutgoingClient.cpp | |
| parent | 49d30871e8a605bea9679353afd9a6fb6a877664 (diff) | |
| download | qxmpp-9168d631d5c266ee79c3112840423d4fca0c96dd.tar.gz | |
Add support for X-OAUTH2 authentication for Google Talk.
Diffstat (limited to 'src/client/QXmppOutgoingClient.cpp')
| -rw-r--r-- | src/client/QXmppOutgoingClient.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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()); |
