summaryrefslogtreecommitdiffstats
path: root/Http/EntryPoint
diff options
context:
space:
mode:
Diffstat (limited to 'Http/EntryPoint')
-rw-r--r--Http/EntryPoint/FormAuthenticationEntryPoint.php3
-rw-r--r--Http/EntryPoint/RetryAuthenticationEntryPoint.php3
2 files changed, 4 insertions, 2 deletions
diff --git a/Http/EntryPoint/FormAuthenticationEntryPoint.php b/Http/EntryPoint/FormAuthenticationEntryPoint.php
index 5809fe8..1f1cda7 100644
--- a/Http/EntryPoint/FormAuthenticationEntryPoint.php
+++ b/Http/EntryPoint/FormAuthenticationEntryPoint.php
@@ -14,6 +14,7 @@ namespace Symfony\Component\Security\Http\EntryPoint;
use Symfony\Component\EventDispatcher\EventInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
+use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface;
use Symfony\Component\HttpKernel\HttpKernelInterface;
@@ -49,6 +50,6 @@ class FormAuthenticationEntryPoint implements AuthenticationEntryPointInterface
return $event->getSubject()->handle(Request::create($this->loginPath), HttpKernelInterface::SUB_REQUEST);
}
- return Response::createRedirect(0 !== strpos($this->loginPath, 'http') ? $request->getUriForPath($this->loginPath) : $this->loginPath, 302);
+ return new RedirectResponse(0 !== strpos($this->loginPath, 'http') ? $request->getUriForPath($this->loginPath) : $this->loginPath, 302);
}
}
diff --git a/Http/EntryPoint/RetryAuthenticationEntryPoint.php b/Http/EntryPoint/RetryAuthenticationEntryPoint.php
index 444535a..cde65aa 100644
--- a/Http/EntryPoint/RetryAuthenticationEntryPoint.php
+++ b/Http/EntryPoint/RetryAuthenticationEntryPoint.php
@@ -15,6 +15,7 @@ use Symfony\Component\EventDispatcher\EventInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface;
use Symfony\Component\HttpFoundation\Response;
+use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Request;
/**
@@ -53,6 +54,6 @@ class RetryAuthenticationEntryPoint implements AuthenticationEntryPointInterface
$url = $scheme.'://'.$request->getHost().$port.$request->getScriptName().$request->getPathInfo().$qs;
- return Response::createRedirect($url, 301);
+ return new RedirectResponse($url, 301);
}
}