mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Shibboleth: Have proper invalidation if timeout during sync
This commit is contained in:
parent
75cff87316
commit
065690c2ce
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user