diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-08-04 18:24:01 +0300 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-08-04 18:24:01 +0300 |
commit | 3a3eb261aad3158b41c5f1a99b48ee35fba39567 (patch) | |
tree | 8cde7b15c259cf1af5089b9ce6ee20346f1e037e /lib | |
parent | 5a4d327c0a58849999fccf2025d633ee8e8f6249 (diff) |
Fix order of session actions
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/SAMLController.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Controller/SAMLController.php b/lib/Controller/SAMLController.php index 6624c3e3..718f8143 100644 --- a/lib/Controller/SAMLController.php +++ b/lib/Controller/SAMLController.php @@ -213,6 +213,10 @@ class SAMLController extends Controller { return new Http\RedirectResponse($this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.notProvisioned')); } + $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()); try { $user = $this->userManager->get($this->userBackend->getCurrentUserId()); if(!($user instanceof IUser)) { @@ -222,10 +226,6 @@ class SAMLController extends Controller { } catch (\Exception $e) { return new Http\RedirectResponse($this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.notProvisioned')); } - $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()); $response = new Http\RedirectResponse(\OC::$server->getURLGenerator()->getAbsoluteURL('/')); // The Nextcloud desktop client expects a cookie with the key of "_shibsession" |