mirror of
https://github.com/nextcloud/server.git
synced 2026-05-23 18:46:30 -04:00
fix(login): Support subfolder install for ephemeral sessions
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
cc6de88dee
commit
8d0ff42e1c
1 changed files with 4 additions and 1 deletions
|
|
@ -10,15 +10,18 @@ namespace OC\Authentication\Login;
|
|||
|
||||
use OC\Core\Controller\ClientFlowLoginV2Controller;
|
||||
use OCP\ISession;
|
||||
use OCP\IURLGenerator;
|
||||
|
||||
class FlowV2EphemeralSessionsCommand extends ALoginCommand {
|
||||
public function __construct(
|
||||
private ISession $session,
|
||||
private IURLGenerator $urlGenerator,
|
||||
) {
|
||||
}
|
||||
|
||||
public function process(LoginData $loginData): LoginResult {
|
||||
if (str_starts_with($loginData->getRedirectUrl() ?? '', '/login/v2/grant')) {
|
||||
$loginV2GrantRoute = $this->urlGenerator->linkToRoute('core.ClientFlowLoginV2.grantPage');
|
||||
if (str_starts_with($loginData->getRedirectUrl() ?? '', $loginV2GrantRoute)) {
|
||||
$this->session->set(ClientFlowLoginV2Controller::EPHEMERAL_NAME, true);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue