summaryrefslogtreecommitdiffstats
path: root/Http/EntryPoint
diff options
context:
space:
mode:
Diffstat (limited to 'Http/EntryPoint')
-rw-r--r--Http/EntryPoint/FormAuthenticationEntryPoint.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/Http/EntryPoint/FormAuthenticationEntryPoint.php b/Http/EntryPoint/FormAuthenticationEntryPoint.php
index 2170e9e..3eaae82 100644
--- a/Http/EntryPoint/FormAuthenticationEntryPoint.php
+++ b/Http/EntryPoint/FormAuthenticationEntryPoint.php
@@ -53,7 +53,12 @@ class FormAuthenticationEntryPoint implements AuthenticationEntryPointInterface
if ($this->useForward) {
$subRequest = $this->httpUtils->createRequest($request, $this->loginPath);
- return $this->httpKernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST);
+ $response = $this->httpKernel->handle($subRequest, HttpKernelInterface::SUB_REQUEST);
+ if (200 === $response->getStatusCode()) {
+ $response->headers->set('X-Status-Code', 401);
+ }
+
+ return $response;
}
return $this->httpUtils->createRedirectResponse($request, $this->loginPath);