diff options
author | Daniel Molkentin <danimo@owncloud.com> | 2014-05-28 12:03:07 +0400 |
---|---|---|
committer | Daniel Molkentin <danimo@owncloud.com> | 2014-05-28 17:25:43 +0400 |
commit | 86a48b52e981e3371e6cf29a48c196b0ba16822b (patch) | |
tree | 230645b26610fe981b5797e4a6db1dddb2c7cc89 /src/creds | |
parent | ebe1f986f1ae808e25ed632aa67b85eee9d23d9d (diff) |
Shib: Show a notification whenever the shib session times out
This is designed as a passive popup notification so that it will
not surprise or annoy the users.
Fixes Enterprise issue #179
Diffstat (limited to 'src/creds')
-rw-r--r-- | src/creds/shibboleth/shibbolethwebview.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/creds/shibboleth/shibbolethwebview.cpp b/src/creds/shibboleth/shibbolethwebview.cpp index f94f76476..f4948b04d 100644 --- a/src/creds/shibboleth/shibbolethwebview.cpp +++ b/src/creds/shibboleth/shibbolethwebview.cpp @@ -25,6 +25,7 @@ #include "creds/shibboleth/shibbolethwebview.h" #include "creds/shibbolethcredentials.h" #include "mirall/account.h" +#include "mirall/logger.h" #include "mirall/mirallaccessmanager.h" #include "mirall/theme.h" @@ -53,6 +54,13 @@ ShibbolethWebView::ShibbolethWebView(Account* account, QWidget* parent) page->mainFrame()->load(account->url()); this->setPage(page); setWindowTitle(tr("%1 - Authenticate").arg(Theme::instance()->appNameGUI())); + + // If we have a valid cookie, it's most likely expired. We can use this as + // as a criteria to tell the user why the browser window pops up + QNetworkCookie shibCookie = ShibbolethCredentials::findShibCookie(_account, ShibbolethCredentials::accountCookies(_account)); + if (shibCookie != QNetworkCookie()) { + Logger::instance()->postOptionalGuiLog(tr("Reauthentication required"), tr("Your session has expired. You need to re-login to continue to use the client.")); + } } ShibbolethWebView::~ShibbolethWebView() |