mirror of
https://github.com/netzbegruenung/user_saml.git
synced 2024-05-02 09:14:50 +02:00
Fix order of session actions
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
5a4d327c0a
commit
3a3eb261aa
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue