[SCM] ktp-auth-handler packaging branch, master, updated. debian/15.12.1-2-282-g080758e
Maximiliano Curia
maxy at moszumanska.debian.org
Fri May 27 23:58:40 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-auth-handler.git;a=commitdiff;h=8bdc484
The following commit has been merged in the master branch:
commit 8bdc4847ed069dedd2ff74ef294d3db2d4de7294
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date: Wed Jan 18 11:35:15 2012 +0100
Fix X-MESSENGER-OAUTH authentication when token is expired
BUG: 291705
---
x-messenger-oauth2-auth-operation.cpp | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/x-messenger-oauth2-auth-operation.cpp b/x-messenger-oauth2-auth-operation.cpp
index 10a6e56..3959263 100644
--- a/x-messenger-oauth2-auth-operation.cpp
+++ b/x-messenger-oauth2-auth-operation.cpp
@@ -81,6 +81,19 @@ void XMessengerOAuth2AuthOperation::onSASLStatusChanged(uint status, const QStri
case Tp::SASLStatusServerFailed:
{
kDebug() << "Error authenticating - reason:" << reason << "- details:" << details;
+ if (wallet.hasEntry(m_account, XMessengerOAuth2TokenWalletEntry)) {
+ // We cannot try again (TODO canTryAgain seems to be always false for
+ // X-MESSENGER-OAUTH but we should insert a check here)
+ // but we can remove the token and request again to set the account
+ // online like we do for X-TELEPATHY-PASSWORD.
+ // A new channel will be created, but since we deleted the token entry,
+ // next time we will prompt for password and the user won't see any
+ // difference except for an authentication error notification
+ // TODO There should be a way to renew the token if it is expired.
+ wallet.removeEntry(m_account, XMessengerOAuth2TokenWalletEntry);
+ Tp::Presence requestedPresence = m_account->requestedPresence();
+ m_account->setRequestedPresence(requestedPresence);
+ }
QString errorMessage = details[QLatin1String("server-message")].toString();
setFinishedWithError(reason, errorMessage.isEmpty() ? i18n("Authentication error") : errorMessage);
break;
--
ktp-auth-handler packaging
More information about the pkg-kde-commits
mailing list