Skip to content

Commit

Permalink
make LoginController::REDIRECT_AFTER_LOGIN public to let gss use it, …
Browse files Browse the repository at this point in the history
…add warning about what happens on the master node

Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
  • Loading branch information
julien-nc committed Feb 13, 2025
1 parent 740d685 commit 0a3117b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class LoginController extends BaseOidcController {
private const STATE = 'oidc.state';
private const NONCE = 'oidc.nonce';
public const PROVIDERID = 'oidc.providerid';
private const REDIRECT_AFTER_LOGIN = 'oidc.redirect';
public const REDIRECT_AFTER_LOGIN = 'oidc.redirect';
private const ID_TOKEN = 'oidc.id_token';
private const CODE_VERIFIER = 'oidc.code_verifier';

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

0 comments on commit 0a3117b

Please sign in to comment.