diff options
Diffstat (limited to 'Http/Authentication/AuthenticationUtils.php')
-rw-r--r-- | Http/Authentication/AuthenticationUtils.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Http/Authentication/AuthenticationUtils.php b/Http/Authentication/AuthenticationUtils.php index 03f5e44..38763dc 100644 --- a/Http/Authentication/AuthenticationUtils.php +++ b/Http/Authentication/AuthenticationUtils.php @@ -11,10 +11,10 @@ namespace Symfony\Component\Security\Http\Authentication; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Security\Core\Exception\AuthenticationException; -use Symfony\Component\Security\Core\SecurityContextInterface; -use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Security\Core\Security; /** * Extracts Security Errors from Request @@ -46,13 +46,13 @@ class AuthenticationUtils $session = $request->getSession(); $authenticationException = null; - if ($request->attributes->has(SecurityContextInterface::AUTHENTICATION_ERROR)) { - $authenticationException = $request->attributes->get(SecurityContextInterface::AUTHENTICATION_ERROR); - } elseif ($session !== null && $session->has(SecurityContextInterface::AUTHENTICATION_ERROR)) { - $authenticationException = $session->get(SecurityContextInterface::AUTHENTICATION_ERROR); + if ($request->attributes->has(Security::AUTHENTICATION_ERROR)) { + $authenticationException = $request->attributes->get(Security::AUTHENTICATION_ERROR); + } elseif ($session !== null && $session->has(Security::AUTHENTICATION_ERROR)) { + $authenticationException = $session->get(Security::AUTHENTICATION_ERROR); if ($clearSession) { - $session->remove(SecurityContextInterface::AUTHENTICATION_ERROR); + $session->remove(Security::AUTHENTICATION_ERROR); } } @@ -66,7 +66,7 @@ class AuthenticationUtils { $session = $this->getRequest()->getSession(); - return null === $session ? '' : $session->get(SecurityContextInterface::LAST_USERNAME); + return null === $session ? '' : $session->get(Security::LAST_USERNAME); } /** |