summaryrefslogtreecommitdiffstats
path: root/Http
diff options
context:
space:
mode:
Diffstat (limited to 'Http')
-rw-r--r--Http/Firewall/AbstractAuthenticationListener.php6
-rw-r--r--Http/Firewall/AbstractPreAuthenticatedListener.php6
-rw-r--r--Http/Firewall/ContextListener.php4
-rw-r--r--Http/Firewall/ExceptionListener.php2
-rw-r--r--Http/Firewall/RememberMeListener.php6
-rw-r--r--Http/Firewall/SwitchUserListener.php6
-rw-r--r--Http/SecurityEvents.php (renamed from Http/Events.php)6
7 files changed, 18 insertions, 18 deletions
diff --git a/Http/Firewall/AbstractAuthenticationListener.php b/Http/Firewall/AbstractAuthenticationListener.php
index 2b2db40..1fc61e6 100644
--- a/Http/Firewall/AbstractAuthenticationListener.php
+++ b/Http/Firewall/AbstractAuthenticationListener.php
@@ -20,7 +20,7 @@ use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterfac
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\HttpKernel\Log\LoggerInterface;
use Symfony\Component\HttpKernel\HttpKernelInterface;
-use Symfony\Component\HttpKernel\Events as KernelEvents;
+use Symfony\Component\HttpKernel\CoreEvents;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -28,7 +28,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
-use Symfony\Component\Security\Http\Events;
+use Symfony\Component\Security\Http\SecurityEvents;
/**
* The AbstractAuthenticationListener is the preferred base class for all
@@ -216,7 +216,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
if (null !== $this->dispatcher) {
$loginEvent = new InteractiveLoginEvent($request, $token);
- $this->dispatcher->dispatch(Events::onSecurityInteractiveLogin, $loginEvent);
+ $this->dispatcher->dispatch(SecurityEvents::interactiveLogin, $loginEvent);
}
if (null !== $this->successHandler) {
diff --git a/Http/Firewall/AbstractPreAuthenticatedListener.php b/Http/Firewall/AbstractPreAuthenticatedListener.php
index 88faa27..f9dbacd 100644
--- a/Http/Firewall/AbstractPreAuthenticatedListener.php
+++ b/Http/Firewall/AbstractPreAuthenticatedListener.php
@@ -16,9 +16,9 @@ use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterfac
use Symfony\Component\Security\Core\Authentication\Token\PreAuthenticatedToken;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
-use Symfony\Component\Security\Http\Events;
+use Symfony\Component\Security\Http\SecurityEvents;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
-use Symfony\Component\HttpKernel\Events as KernelEvents;
+use Symfony\Component\HttpKernel\CoreEvents;
use Symfony\Component\HttpKernel\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -82,7 +82,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
if (null !== $this->dispatcher) {
$loginEvent = new InteractiveLoginEvent($request, $token);
- $this->dispatcher->dispatch(Events::onSecurityInteractiveLogin, $loginEvent);
+ $this->dispatcher->dispatch(SecurityEvents::interactiveLogin, $loginEvent);
}
} catch (AuthenticationException $failed) {
$this->securityContext->setToken(null);
diff --git a/Http/Firewall/ContextListener.php b/Http/Firewall/ContextListener.php
index 331a1e3..bbcf966 100644
--- a/Http/Firewall/ContextListener.php
+++ b/Http/Firewall/ContextListener.php
@@ -16,7 +16,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Log\LoggerInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
-use Symfony\Component\HttpKernel\Events;
+use Symfony\Component\HttpKernel\CoreEvents;
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
@@ -49,7 +49,7 @@ class ContextListener implements ListenerInterface
$this->contextKey = $contextKey;
if (null !== $dispatcher) {
- $dispatcher->addListener(Events::onCoreResponse, $this);
+ $dispatcher->addListener(CoreEvents::response, array($this, 'core.response'));
}
}
diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php
index ce659de..e9e2e4b 100644
--- a/Http/Firewall/ExceptionListener.php
+++ b/Http/Firewall/ExceptionListener.php
@@ -23,7 +23,7 @@ use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
use Symfony\Component\Security\Core\Exception\InsufficientAuthenticationException;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\HttpKernelInterface;
-use Symfony\Component\HttpKernel\Events;
+use Symfony\Component\HttpKernel\CoreEvents;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
diff --git a/Http/Firewall/RememberMeListener.php b/Http/Firewall/RememberMeListener.php
index 10ed8c6..d605074 100644
--- a/Http/Firewall/RememberMeListener.php
+++ b/Http/Firewall/RememberMeListener.php
@@ -6,7 +6,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Log\LoggerInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
-use Symfony\Component\HttpKernel\Events as KernelEvents;
+use Symfony\Component\HttpKernel\CoreEvents;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface;
@@ -15,7 +15,7 @@ use Symfony\Component\Security\Core\Exception\CookieTheftException;
use Symfony\Component\Security\Core\SecurityContext;
use Symfony\Component\Security\Http\RememberMe\RememberMeServicesInterface;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;
-use Symfony\Component\Security\Http\Events;
+use Symfony\Component\Security\Http\SecurityEvents;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/*
@@ -80,7 +80,7 @@ class RememberMeListener implements ListenerInterface
if (null !== $this->dispatcher) {
$loginEvent = new InteractiveLoginEvent($request, $token);
- $this->dispatcher->dispatch(Events::onSecurityInteractiveLogin, $loginEvent);
+ $this->dispatcher->dispatch(SecurityEvents::interactiveLogin, $loginEvent);
}
if (null !== $this->logger) {
diff --git a/Http/Firewall/SwitchUserListener.php b/Http/Firewall/SwitchUserListener.php
index 0977cb1..6157d7a 100644
--- a/Http/Firewall/SwitchUserListener.php
+++ b/Http/Firewall/SwitchUserListener.php
@@ -27,7 +27,7 @@ use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use Symfony\Component\Security\Core\Exception\AuthenticationCredentialsNotFoundException;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Http\Event\SwitchUserEvent;
-use Symfony\Component\Security\Http\Events;
+use Symfony\Component\Security\Http\SecurityEvents;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
@@ -133,7 +133,7 @@ class SwitchUserListener implements ListenerInterface
if (null !== $this->dispatcher) {
$switchEvent = new SwitchUserEvent($request, $token->getUser());
- $this->dispatcher->dispatch(Events::onSecuritySwitchUser, $switchEvent);
+ $this->dispatcher->dispatch(SecurityEvents::switchUser, $switchEvent);
}
return $token;
@@ -154,7 +154,7 @@ class SwitchUserListener implements ListenerInterface
if (null !== $this->dispatcher) {
$switchEvent = new SwitchUserEvent($request, $original->getUser());
- $this->dispatcher->dispatch(Events::onSecuritySwitchUser, $switchEvent);
+ $this->dispatcher->dispatch(SecurityEvents::switchUser, $switchEvent);
}
return $original;
diff --git a/Http/Events.php b/Http/SecurityEvents.php
index c0aa65d..abdbff1 100644
--- a/Http/Events.php
+++ b/Http/SecurityEvents.php
@@ -11,9 +11,9 @@
namespace Symfony\Component\Security\Http;
-final class Events
+final class SecurityEvents
{
- const onSecurityInteractiveLogin = 'onSecurityInteractiveLogin';
+ const interactiveLogin = 'security.interactive_login';
- const onSecuritySwitchUser = 'onSecuritySwitchUser';
+ const switchUser = 'security.switch_user';
} \ No newline at end of file