summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Http/Firewall/AbstractAuthenticationListener.php8
-rw-r--r--Http/Firewall/ExceptionListener.php2
-rw-r--r--Http/Firewall/UsernamePasswordFormAuthenticationListener.php2
3 files changed, 6 insertions, 6 deletions
diff --git a/Http/Firewall/AbstractAuthenticationListener.php b/Http/Firewall/AbstractAuthenticationListener.php
index 3335110..2a07cfa 100644
--- a/Http/Firewall/AbstractAuthenticationListener.php
+++ b/Http/Firewall/AbstractAuthenticationListener.php
@@ -195,7 +195,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
}
$subRequest = Request::create($this->options['failure_path']);
- $subRequest->attributes->set(SecurityContext::AUTHENTICATION_ERROR, $failed->getMessage());
+ $subRequest->attributes->set(SecurityContextInterface::AUTHENTICATION_ERROR, $failed->getMessage());
return $event->getSubject()->handle($subRequest, HttpKernelInterface::SUB_REQUEST);
} else {
@@ -203,7 +203,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
$this->logger->debug(sprintf('Redirecting to %s', $this->options['failure_path']));
}
- $request->getSession()->set(SecurityContext::AUTHENTICATION_ERROR, $failed->getMessage());
+ $request->getSession()->set(SecurityContextInterface::AUTHENTICATION_ERROR, $failed->getMessage());
$response = new Response();
$response->setRedirect(0 !== strpos($this->options['failure_path'], 'http') ? $request->getUriForPath($this->options['failure_path']) : $this->options['failure_path'], 302);
@@ -221,8 +221,8 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
$this->securityContext->setToken($token);
$session = $request->getSession();
- $session->remove(SecurityContext::AUTHENTICATION_ERROR);
- $session->remove(SecurityContext::LAST_USERNAME);
+ $session->remove(SecurityContextInterface::AUTHENTICATION_ERROR);
+ $session->remove(SecurityContextInterface::LAST_USERNAME);
if (null !== $this->eventDispatcher) {
$this->eventDispatcher->notify(new Event($this, 'security.interactive_login', array('request' => $request, 'token' => $token)));
diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php
index 7a47437..350b029 100644
--- a/Http/Firewall/ExceptionListener.php
+++ b/Http/Firewall/ExceptionListener.php
@@ -124,7 +124,7 @@ class ExceptionListener implements ListenerInterface
}
$subRequest = Request::create($this->errorPage);
- $subRequest->attributes->set(SecurityContext::ACCESS_DENIED_ERROR, $exception->getMessage());
+ $subRequest->attributes->set(SecurityContextInterface::ACCESS_DENIED_ERROR, $exception->getMessage());
$response = $event->getSubject()->handle($subRequest, HttpKernelInterface::SUB_REQUEST, true);
$response->setStatusCode(403);
diff --git a/Http/Firewall/UsernamePasswordFormAuthenticationListener.php b/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
index e8ea6f9..f166036 100644
--- a/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
+++ b/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
@@ -57,7 +57,7 @@ class UsernamePasswordFormAuthenticationListener extends AbstractAuthenticationL
$username = trim($request->get($this->options['username_parameter']));
$password = $request->get($this->options['password_parameter']);
- $request->getSession()->set(SecurityContext::LAST_USERNAME, $username);
+ $request->getSession()->set(SecurityContextInterface::LAST_USERNAME, $username);
return $this->authenticationManager->authenticate(new UsernamePasswordToken($username, $password, $this->providerKey));
}