[Security] fixed event names

This commit is contained in:
Fabien Potencier 2011-05-30 09:57:56 +02:00
parent 4753bb2e91
commit d7220f0c1a
5 changed files with 7 additions and 7 deletions

View File

@ -221,7 +221,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
if (null !== $this->dispatcher) {
$loginEvent = new InteractiveLoginEvent($request, $token);
$this->dispatcher->dispatch(SecurityEvents::interactiveLogin, $loginEvent);
$this->dispatcher->dispatch(SecurityEvents::INTERACTIVE_LOGIN, $loginEvent);
}
if (null !== $this->successHandler) {

View File

@ -82,7 +82,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
if (null !== $this->dispatcher) {
$loginEvent = new InteractiveLoginEvent($request, $token);
$this->dispatcher->dispatch(SecurityEvents::interactiveLogin, $loginEvent);
$this->dispatcher->dispatch(SecurityEvents::INTERACTIVE_LOGIN, $loginEvent);
}
} catch (AuthenticationException $failed) {
$this->securityContext->setToken(null);

View File

@ -80,7 +80,7 @@ class RememberMeListener implements ListenerInterface
if (null !== $this->dispatcher) {
$loginEvent = new InteractiveLoginEvent($request, $token);
$this->dispatcher->dispatch(SecurityEvents::interactiveLogin, $loginEvent);
$this->dispatcher->dispatch(SecurityEvents::INTERACTIVE_LOGIN, $loginEvent);
}
if (null !== $this->logger) {

View File

@ -133,7 +133,7 @@ class SwitchUserListener implements ListenerInterface
if (null !== $this->dispatcher) {
$switchEvent = new SwitchUserEvent($request, $token->getUser());
$this->dispatcher->dispatch(SecurityEvents::switchUser, $switchEvent);
$this->dispatcher->dispatch(SecurityEvents::SWITCH_USER, $switchEvent);
}
return $token;
@ -154,7 +154,7 @@ class SwitchUserListener implements ListenerInterface
if (null !== $this->dispatcher) {
$switchEvent = new SwitchUserEvent($request, $original->getUser());
$this->dispatcher->dispatch(SecurityEvents::switchUser, $switchEvent);
$this->dispatcher->dispatch(SecurityEvents::SWITCH_USER, $switchEvent);
}
return $original;

View File

@ -13,7 +13,7 @@ namespace Symfony\Component\Security\Http;
final class SecurityEvents
{
const interactiveLogin = 'security.interactive_login';
const INTERACTIVE_LOGIN = 'security.interactive_login';
const switchUser = 'security.switch_user';
const SWITCH_USER = 'security.switch_user';
}