[Pkg-owncloud-commits] [owncloud-client] 24/33: Shibboleth: Have proper invalidation if timeout during sync

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu Feb 27 19:44:25 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch upstream
in repository owncloud-client.

commit 065690c2cead75efa142cb54a7d8682cd7bfde7b
Author: Markus Goetz <markus at woboq.com>
Date:   Tue Feb 25 09:32:31 2014 +0100

    Shibboleth: Have proper invalidation if timeout during sync
---
 src/creds/shibbolethcredentials.cpp | 14 ++++++++++++++
 src/creds/shibbolethcredentials.h   |  1 +
 2 files changed, 15 insertions(+)

diff --git a/src/creds/shibbolethcredentials.cpp b/src/creds/shibbolethcredentials.cpp
index 9e5e847..7b7019a 100644
--- a/src/creds/shibbolethcredentials.cpp
+++ b/src/creds/shibbolethcredentials.cpp
@@ -254,6 +254,20 @@ void ShibbolethCredentials::slotBrowserHidden()
 void ShibbolethCredentials::invalidateAndFetch(Account* account)
 {
     _ready = false;
+
+    // delete the credentials, then in the slot fetch them again (which will trigger browser)
+    DeletePasswordJob *job = new DeletePasswordJob(Theme::instance()->appName());
+    job->setProperty("account", QVariant::fromValue(account));
+    job->setSettings(account->settingsWithGroup(Theme::instance()->appName()));
+    connect(job, SIGNAL(finished(QKeychain::Job*)), SLOT(slotInvalidateAndFetchInvalidateDone(QKeychain::Job*)));
+    job->setKey(keychainKey(account->url().toString(), "shibAssertion"));
+    job->start();
+}
+
+void ShibbolethCredentials::slotInvalidateAndFetchInvalidateDone(QKeychain::Job* job)
+{
+    Account *account = qvariant_cast<Account*>(job->property("account"));
+
     connect (this, SIGNAL(fetched()),
              this, SLOT(onFetched()));
     // small hack to support the ShibbolethRefresher hack
diff --git a/src/creds/shibbolethcredentials.h b/src/creds/shibbolethcredentials.h
index 1a59547..b3f922f 100644
--- a/src/creds/shibbolethcredentials.h
+++ b/src/creds/shibbolethcredentials.h
@@ -60,6 +60,7 @@ private Q_SLOTS:
     void slotBrowserHidden();
     void onFetched();
     void slotReadJobDone(QKeychain::Job*);
+    void slotInvalidateAndFetchInvalidateDone(QKeychain::Job*);
 
 Q_SIGNALS:
     void newCookie(const QNetworkCookie& cookie);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list