[Security] fixed event names
This commit is contained in:
parent
4753bb2e91
commit
d7220f0c1a
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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';
|
||||
}
|
Reference in New Issue
Block a user