diff --git a/src/creds/shibbolethcredentials.cpp b/src/creds/shibbolethcredentials.cpp index 9e5e847c87..7b7019ac43 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(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 1a59547fec..b3f922f030 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);