Skip to content

Commit

Permalink
Shib: Use different keychain entry per account #5469
Browse files Browse the repository at this point in the history
Previously shib multiaccount didn't work at all because the
session cookie was stored in the same keychain entry.
  • Loading branch information
ckamm committed Jan 24, 2017
1 parent 26234db commit 59c1fdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/creds/shibbolethcredentials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void ShibbolethCredentials::fetchFromKeychain()
ReadPasswordJob *job = new ReadPasswordJob(Theme::instance()->appName());
job->setSettings(Utility::settingsWithGroup(Theme::instance()->appName(), job).release());
job->setInsecureFallback(false);
job->setKey(keychainKey(_account->url().toString(), "shibAssertion"));
job->setKey(keychainKey(_account->url().toString(), user()));
connect(job, SIGNAL(finished(QKeychain::Job*)), SLOT(slotReadJobDone(QKeychain::Job*)));
job->start();
}
Expand Down Expand Up @@ -309,7 +309,7 @@ void ShibbolethCredentials::storeShibCookie(const QNetworkCookie &cookie)
job->setSettings(Utility::settingsWithGroup(Theme::instance()->appName(), job).release());
// we don't really care if it works...
//connect(job, SIGNAL(finished(QKeychain::Job*)), SLOT(slotWriteJobDone(QKeychain::Job*)));
job->setKey(keychainKey(_account->url().toString(), "shibAssertion"));
job->setKey(keychainKey(_account->url().toString(), user()));
job->setTextData(QString::fromUtf8(cookie.toRawForm()));
job->start();
}
Expand All @@ -318,7 +318,7 @@ void ShibbolethCredentials::removeShibCookie()
{
DeletePasswordJob *job = new DeletePasswordJob(Theme::instance()->appName());
job->setSettings(Utility::settingsWithGroup(Theme::instance()->appName(), job).release());
job->setKey(keychainKey(_account->url().toString(), "shibAssertion"));
job->setKey(keychainKey(_account->url().toString(), user()));
job->start();
}

Expand Down

0 comments on commit 59c1fdb

Please sign in to comment.