[Pkg-owncloud-commits] [owncloud-client] 65/83: Shib: Show a notification whenever the shib session times out

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat May 31 11:31:44 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 86a48b52e981e3371e6cf29a48c196b0ba16822b
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Wed May 28 10:03:07 2014 +0200

    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
---
 src/creds/shibboleth/shibbolethwebview.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/creds/shibboleth/shibbolethwebview.cpp b/src/creds/shibboleth/shibbolethwebview.cpp
index f94f764..f4948b0 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()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list