Skip to content

Commit 2debe7a

Browse files
committed
make LoginController::REDIRECT_AFTER_LOGIN public to let gss use it, add warning about what happens on the master node
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
1 parent 740d685 commit 2debe7a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/Controller/LoginController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class LoginController extends BaseOidcController {
5757
private const STATE = 'oidc.state';
5858
private const NONCE = 'oidc.nonce';
5959
public const PROVIDERID = 'oidc.providerid';
60-
private const REDIRECT_AFTER_LOGIN = 'oidc.redirect';
60+
public const REDIRECT_AFTER_LOGIN = 'oidc.redirect';
6161
private const ID_TOKEN = 'oidc.id_token';
6262
private const CODE_VERIFIER = 'oidc.code_verifier';
6363

@@ -514,6 +514,8 @@ public function code(string $state = '', string $code = '', string $scope = '',
514514
$this->userSession->createSessionToken($this->request, $user->getUID(), $user->getUID());
515515
$this->userSession->createRememberMeToken($user);
516516
// TODO server should/could be refactored so we don't need to manually create the user session and dispatch the login-related events
517+
// Warning! If GSS is used, it reacts to the BeforeUserLoggedInEvent and handles the redirection itself
518+
// So nothing after dispatching this event will be executed
517519
$this->eventDispatcher->dispatchTyped(new BeforeUserLoggedInEvent($user->getUID(), null, \OC::$server->get(Backend::class)));
518520
$this->eventDispatcher->dispatchTyped(new UserLoggedInEvent($user, $user->getUID(), null, false));
519521
}

0 commit comments

Comments
 (0)