summaryrefslogtreecommitdiffstats
path: root/Http/HttpUtils.php
diff options
context:
space:
mode:
authorIltar van der Berg <ivanderberg@hostnet.nl>2014-09-29 09:09:34 +0200
committerIltar van der Berg <ivanderberg@hostnet.nl>2014-09-29 09:38:25 +0200
commite70cd1cffa71f5d45b3b47d0ef4f5ac4e49db0fa (patch)
treecb29987795eec2280b860583e4a22124cdeb01e5 /Http/HttpUtils.php
parent13d75567bf16e646536e9683097b6faa08dc728e (diff)
downloadsymfony-security-e70cd1cffa71f5d45b3b47d0ef4f5ac4e49db0fa.zip
symfony-security-e70cd1cffa71f5d45b3b47d0ef4f5ac4e49db0fa.tar.gz
symfony-security-e70cd1cffa71f5d45b3b47d0ef4f5ac4e49db0fa.tar.bz2
[DX] Moved constants to a final class
Diffstat (limited to 'Http/HttpUtils.php')
-rw-r--r--Http/HttpUtils.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/Http/HttpUtils.php b/Http/HttpUtils.php
index 451c12c..fbcfdb7 100644
--- a/Http/HttpUtils.php
+++ b/Http/HttpUtils.php
@@ -11,8 +11,6 @@
namespace Symfony\Component\Security\Http;
-use Symfony\Component\Security\Core\SecurityContextInterface;
-
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing\Matcher\UrlMatcherInterface;
@@ -20,6 +18,7 @@ use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
+use Symfony\Component\Security\Core\Security;
/**
* Encapsulates the logic needed to create sub-requests, redirect the user, and match URLs.
@@ -77,14 +76,14 @@ class HttpUtils
$newRequest->setSession($request->getSession());
}
- if ($request->attributes->has(SecurityContextInterface::AUTHENTICATION_ERROR)) {
- $newRequest->attributes->set(SecurityContextInterface::AUTHENTICATION_ERROR, $request->attributes->get(SecurityContextInterface::AUTHENTICATION_ERROR));
+ if ($request->attributes->has(Security::AUTHENTICATION_ERROR)) {
+ $newRequest->attributes->set(Security::AUTHENTICATION_ERROR, $request->attributes->get(Security::AUTHENTICATION_ERROR));
}
- if ($request->attributes->has(SecurityContextInterface::ACCESS_DENIED_ERROR)) {
- $newRequest->attributes->set(SecurityContextInterface::ACCESS_DENIED_ERROR, $request->attributes->get(SecurityContextInterface::ACCESS_DENIED_ERROR));
+ if ($request->attributes->has(Security::ACCESS_DENIED_ERROR)) {
+ $newRequest->attributes->set(Security::ACCESS_DENIED_ERROR, $request->attributes->get(Security::ACCESS_DENIED_ERROR));
}
- if ($request->attributes->has(SecurityContextInterface::LAST_USERNAME)) {
- $newRequest->attributes->set(SecurityContextInterface::LAST_USERNAME, $request->attributes->get(SecurityContextInterface::LAST_USERNAME));
+ if ($request->attributes->has(Security::LAST_USERNAME)) {
+ $newRequest->attributes->set(Security::LAST_USERNAME, $request->attributes->get(Security::LAST_USERNAME));
}
return $newRequest;