diff --git a/src/gui/creds/shibboleth/shibbolethwebview.cpp b/src/gui/creds/shibboleth/shibbolethwebview.cpp index f98a2c3061..7bc11c88bd 100644 --- a/src/gui/creds/shibboleth/shibbolethwebview.cpp +++ b/src/gui/creds/shibboleth/shibbolethwebview.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include "creds/shibboleth/shibbolethwebview.h" #include "creds/shibbolethcredentials.h" @@ -74,10 +75,23 @@ ShibbolethWebView::ShibbolethWebView(AccountPtr account, QWidget* parent) connect(page->networkAccessManager()->cookieJar(), SIGNAL(newCookiesForUrl (QList, QUrl)), this, SLOT(onNewCookiesForUrl (QList, QUrl))); + page->mainFrame()->load(account->url()); this->setPage(page); setWindowTitle(tr("%1 - Authenticate").arg(Theme::instance()->appNameGUI())); + // Debug view to display the cipher suite + if( !qgetenv("OWNCLOUD_SHIBBOLETH_DEBUG").isEmpty() ) { + // open an additional window to display some cipher debug info + QWebPage *debugPage = new UserAgentWebPage(this); + debugPage->mainFrame()->load( QUrl("https://cc.dcsec.uni-hannover.de/")); + QWebView *debugView = new QWebView(this); + debugView->setPage(debugPage); + QMainWindow *window = new QMainWindow(this); + window->setWindowTitle(tr("SSL Chipher Debug View")); + window->setCentralWidget(debugView); + window->show(); + } // 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.data(), ShibbolethCredentials::accountCookies(_account.data())); @@ -142,7 +156,6 @@ void ShibbolethWebView::slotLoadFinished(bool success) if (!success) { qDebug() << Q_FUNC_INFO << "Could not load Shibboleth login page to log you in."; - } }