Shibboleth: Have proper invalidation if timeout during sync

This commit is contained in:
Markus Goetz 2014-02-25 09:32:31 +01:00
parent 75cff87316
commit 065690c2ce
2 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -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);