[Security] Fixed method names in the Firewall listeners
This commit is contained in:
parent
ab57e5c611
commit
466f1b99c5
@ -22,7 +22,7 @@ interface AuthenticationFailureHandlerInterface
|
||||
* called by authentication listeners inheriting from
|
||||
* AbstractAuthenticationListener.
|
||||
*
|
||||
* @param GetResponseEvent $event the "onCoreSecurity" event, this event always
|
||||
* @param GetResponseEvent $event the "onCoreRequest" event, this event always
|
||||
* has the kernel as target
|
||||
* @param Request $request
|
||||
* @param AuthenticationException $exception
|
||||
|
@ -22,7 +22,7 @@ interface AuthenticationSuccessHandlerInterface
|
||||
* is called by authentication listeners inheriting from
|
||||
* AbstractAuthenticationListener.
|
||||
*
|
||||
* @param GetResponseEvent $event the "onCoreSecurity" event, this event always
|
||||
* @param GetResponseEvent $event the "onCoreRequest" event, this event always
|
||||
* has the kernel as target
|
||||
* @param Request $request
|
||||
* @param TokenInterface $token
|
||||
|
@ -26,7 +26,7 @@ interface AuthenticationEntryPointInterface
|
||||
/**
|
||||
* Starts the authentication scheme.
|
||||
*
|
||||
* @param GetResponseEvent $event The "onCoreSecurity" event
|
||||
* @param GetResponseEvent $event The "onCoreRequest" event
|
||||
* @param object $request The request that resulted in an AuthenticationException
|
||||
* @param AuthenticationException $authException The exception that started the authentication process
|
||||
*/
|
||||
|
@ -107,7 +107,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
|
||||
*
|
||||
* @param GetResponseEvent $event A GetResponseEvent instance
|
||||
*/
|
||||
public final function onCoreSecurity(GetResponseEvent $event)
|
||||
public final function handle(GetResponseEvent $event)
|
||||
{
|
||||
$request = $event->getRequest();
|
||||
|
||||
|
@ -52,7 +52,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
|
||||
*
|
||||
* @param GetResponseEvent $event A GetResponseEvent instance
|
||||
*/
|
||||
public final function onCoreSecurity(GetResponseEvent $event)
|
||||
public final function handle(GetResponseEvent $event)
|
||||
{
|
||||
$request = $event->getRequest();
|
||||
|
||||
|
@ -48,7 +48,7 @@ class AccessListener implements ListenerInterface
|
||||
*
|
||||
* @param GetResponseEvent $event A GetResponseEvent instance
|
||||
*/
|
||||
public function onCoreSecurity(GetResponseEvent $event)
|
||||
public function handle(GetResponseEvent $event)
|
||||
{
|
||||
if (null === $token = $this->context->getToken()) {
|
||||
throw new AuthenticationCredentialsNotFoundException('A Token was not found in the SecurityContext.');
|
||||
|
@ -41,7 +41,7 @@ class AnonymousAuthenticationListener implements ListenerInterface
|
||||
*
|
||||
* @param GetResponseEvent $event A GetResponseEvent instance
|
||||
*/
|
||||
public function onCoreSecurity(GetResponseEvent $event)
|
||||
public function handle(GetResponseEvent $event)
|
||||
{
|
||||
if (null !== $this->context->getToken()) {
|
||||
return;
|
||||
|
@ -53,7 +53,7 @@ class BasicAuthenticationListener implements ListenerInterface
|
||||
*
|
||||
* @param GetResponseEvent $event A GetResponseEvent instance
|
||||
*/
|
||||
public function onCoreSecurity(GetResponseEvent $event)
|
||||
public function handle(GetResponseEvent $event)
|
||||
{
|
||||
$request = $event->getRequest();
|
||||
|
||||
|
@ -41,7 +41,7 @@ class ChannelListener implements ListenerInterface
|
||||
*
|
||||
* @param GetResponseEvent $event A GetResponseEvent instance
|
||||
*/
|
||||
public function onCoreSecurity(GetResponseEvent $event)
|
||||
public function handle(GetResponseEvent $event)
|
||||
{
|
||||
$request = $event->getRequest();
|
||||
|
||||
|
@ -58,7 +58,7 @@ class ContextListener implements ListenerInterface
|
||||
*
|
||||
* @param GetResponseEvent $event A GetResponseEvent instance
|
||||
*/
|
||||
public function onCoreSecurity(GetResponseEvent $event)
|
||||
public function handle(GetResponseEvent $event)
|
||||
{
|
||||
$request = $event->getRequest();
|
||||
|
||||
|
@ -56,7 +56,7 @@ class DigestAuthenticationListener implements ListenerInterface
|
||||
*
|
||||
* @param GetResponseEvent $event A GetResponseEvent instance
|
||||
*/
|
||||
public function onCoreSecurity(GetResponseEvent $event)
|
||||
public function handle(GetResponseEvent $event)
|
||||
{
|
||||
$request = $event->getRequest();
|
||||
|
||||
|
@ -26,5 +26,5 @@ interface ListenerInterface
|
||||
*
|
||||
* @param GetResponseEvent $event
|
||||
*/
|
||||
function onCoreSecurity(GetResponseEvent $event);
|
||||
function handle(GetResponseEvent $event);
|
||||
}
|
@ -65,7 +65,7 @@ class LogoutListener implements ListenerInterface
|
||||
*
|
||||
* @param GetResponseEvent $event A GetResponseEvent instance
|
||||
*/
|
||||
public function onCoreSecurity(GetResponseEvent $event)
|
||||
public function handle(GetResponseEvent $event)
|
||||
{
|
||||
$request = $event->getRequest();
|
||||
|
||||
|
@ -62,7 +62,7 @@ class RememberMeListener implements ListenerInterface
|
||||
*
|
||||
* @param GetResponseEvent $event A GetResponseEvent instance
|
||||
*/
|
||||
public function onCoreSecurity(GetResponseEvent $event)
|
||||
public function handle(GetResponseEvent $event)
|
||||
{
|
||||
if (null !== $this->securityContext->getToken()) {
|
||||
return;
|
||||
|
@ -73,7 +73,7 @@ class SwitchUserListener implements ListenerInterface
|
||||
*
|
||||
* @param GetResponseEvent $event A GetResponseEvent instance
|
||||
*/
|
||||
public function onCoreSecurity(GetResponseEvent $event)
|
||||
public function handle(GetResponseEvent $event)
|
||||
{
|
||||
$request = $event->getRequest();
|
||||
|
||||
|
@ -27,7 +27,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase
|
||||
->method('setToken')
|
||||
;
|
||||
|
||||
$this->assertNull($listener->onCoreSecurity($this->getGetResponseEvent()));
|
||||
$this->assertNull($listener->handle($this->getGetResponseEvent()));
|
||||
}
|
||||
|
||||
public function testOnCoreSecurityDoesNothingWhenNoCookieIsSet()
|
||||
@ -53,7 +53,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase
|
||||
->will($this->returnValue(new Request()))
|
||||
;
|
||||
|
||||
$this->assertNull($listener->onCoreSecurity($event));
|
||||
$this->assertNull($listener->handle($event));
|
||||
}
|
||||
|
||||
public function testOnCoreSecurityIgnoresAuthenticationExceptionThrownByAuthenticationManagerImplementation()
|
||||
@ -91,7 +91,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase
|
||||
->will($this->returnValue(new Request()))
|
||||
;
|
||||
|
||||
$listener->onCoreSecurity($event);
|
||||
$listener->handle($event);
|
||||
}
|
||||
|
||||
public function testOnCoreSecurity()
|
||||
@ -130,7 +130,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase
|
||||
->will($this->returnValue(new Request()))
|
||||
;
|
||||
|
||||
$listener->onCoreSecurity($event);
|
||||
$listener->handle($event);
|
||||
}
|
||||
|
||||
protected function getGetResponseEvent()
|
||||
|
Reference in New Issue
Block a user