Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/creds
diff options
context:
space:
mode:
authorDaniel Molkentin <danimo@owncloud.com>2014-06-27 17:34:20 +0400
committerDaniel Molkentin <danimo@owncloud.com>2014-06-27 17:34:20 +0400
commitf8b097669aa5bf651b3a2749190d958a9a79a07f (patch)
tree60ef60fb3bdbbaeee1e2104e01297a08910c0776 /src/creds
parente7d597045b69ec9d2cd99338f6bf74e5d4e476aa (diff)
parent40d765c73aa64de2fcf8503886f27c8da7b7d3d9 (diff)
Merge remote-tracking branch 'origin/1.6'
Conflicts: VERSION.cmake doc/building.rst
Diffstat (limited to 'src/creds')
-rw-r--r--src/creds/shibboleth/shibbolethuserjob.h4
-rw-r--r--src/creds/shibbolethcredentials.cpp17
-rw-r--r--src/creds/shibbolethcredentials.h3
3 files changed, 21 insertions, 3 deletions
diff --git a/src/creds/shibboleth/shibbolethuserjob.h b/src/creds/shibboleth/shibbolethuserjob.h
index f6427a45b..8042fe939 100644
--- a/src/creds/shibboleth/shibbolethuserjob.h
+++ b/src/creds/shibboleth/shibbolethuserjob.h
@@ -26,15 +26,13 @@ class ShibbolethUserJob : public AbstractNetworkJob {
Q_OBJECT
public:
explicit ShibbolethUserJob(Account *account, QObject* parent = 0);
+public slots:
void start();
signals:
// is always emitted when the job is finished. user is empty in case of error.
void userFetched(const QString &user);
- // Another job need to be created
- void tryAgain();
-
private slots:
virtual bool finished();
};
diff --git a/src/creds/shibbolethcredentials.cpp b/src/creds/shibbolethcredentials.cpp
index bf8fea4fe..5b83f701f 100644
--- a/src/creds/shibbolethcredentials.cpp
+++ b/src/creds/shibbolethcredentials.cpp
@@ -94,6 +94,23 @@ ShibbolethCredentials::ShibbolethCredentials()
_browser(0)
{}
+ShibbolethCredentials::ShibbolethCredentials(const QNetworkCookie& cookie, Account* account)
+ : _ready(true),
+ _stillValid(true),
+ _fetchJobInProgress(false),
+ _browser(0),
+ _shibCookie(cookie)
+{
+ if (account) {
+ /* The _user has not yet been fetched, so fetch it now */
+ ShibbolethUserJob *job = new ShibbolethUserJob(account, this);
+ connect(job, SIGNAL(userFetched(QString)), this, SLOT(slotUserFetched(QString)));
+ QTimer::singleShot(1234, job, SLOT(start()));
+
+ }
+}
+
+
void ShibbolethCredentials::syncContextPreInit(CSYNC* ctx)
{
csync_set_auth_callback (ctx, handleNeonSSLProblems);
diff --git a/src/creds/shibbolethcredentials.h b/src/creds/shibbolethcredentials.h
index 85efe51ad..cb778f219 100644
--- a/src/creds/shibbolethcredentials.h
+++ b/src/creds/shibbolethcredentials.h
@@ -40,6 +40,9 @@ Q_OBJECT
public:
ShibbolethCredentials();
+ /* create a credidentials for an already connected account */
+ ShibbolethCredentials(const QNetworkCookie &cookie, Account *acc);
+
void syncContextPreInit(CSYNC* ctx);
void syncContextPreStart(CSYNC* ctx);
bool changed(AbstractCredentials* credentials) const;