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

github.com/nextcloud/user_saml.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-06-29 13:06:50 +0300
committerLukas Reschke <lukas@owncloud.com>2016-06-29 13:06:50 +0300
commit03646e61590d206e34cb19251af9377a61563282 (patch)
treed780b71f02ef14a3af9392b6405aac4f35eabae3 /lib
parent943797c32918946d1aeb58c316eb4a2695cf467a (diff)
Make compatible with desktop clients
The cookie "_SHIBSESSION_" is expected. Fixes https://github.com/nextcloud/user_saml/issues/9
Diffstat (limited to 'lib')
-rw-r--r--lib/controller/samlcontroller.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/controller/samlcontroller.php b/lib/controller/samlcontroller.php
index 21f123b7..d7169177 100644
--- a/lib/controller/samlcontroller.php
+++ b/lib/controller/samlcontroller.php
@@ -108,12 +108,19 @@ class SAMLController extends Controller {
exit();
}
+
$this->session->set('user_saml.samlUserData', $auth->getAttributes());
$this->session->set('user_saml.samlNameId', $auth->getNameId());
$this->session->set('user_saml.samlSessionIndex', $auth->getSessionIndex());
$this->session->set('user_saml.samlSessionExpiration', $auth->getSessionExpiration());
- return new Http\RedirectResponse(\OC::$server->getURLGenerator()->getAbsoluteURL('/'));
+ $response = new Http\RedirectResponse(\OC::$server->getURLGenerator()->getAbsoluteURL('/'));
+ // The Nextcloud desktop client expects a cookie with the key of "_shibsession"
+ // to be there.
+ if($this->request->isUserAgent(['/^.*(mirall|csyncoC)\/.*$/'])) {
+ $response->addCookie('_shibsession_', 'authenticated');
+ }
+ return $response;
}
/**