This commit is contained in:
Juan Pablo Vial
2023-09-28 21:05:16 -03:00
parent 2e2d0f07b4
commit 3141f1e7c4
16 changed files with 556 additions and 19 deletions

View File

@ -17,7 +17,9 @@ class Authentication
return $handler->handle($request);
}
$response = $this->responseFactory->createResponse(301, 'Not logged in');
return $response->withHeader('Location', $this->login_url)
$uri = urlencode(base64_encode((string) $request->getUri()));
return $response->withHeader('Location', implode('?', [$this->login_url, "url={$uri}"]))
->withHeader('Referer', (string) $request->getUri())
->withHeader('X-Redirected-URI', (string) $request->getUri());
}