[Security] Fixed method names in the Firewall listeners

This commit is contained in:
Bernhard Schussek 2011-03-17 13:24:23 +01:00
parent ab57e5c611
commit 466f1b99c5
16 changed files with 19 additions and 19 deletions

View File

@ -22,7 +22,7 @@ interface AuthenticationFailureHandlerInterface
* called by authentication listeners inheriting from * called by authentication listeners inheriting from
* AbstractAuthenticationListener. * AbstractAuthenticationListener.
* *
* @param GetResponseEvent $event the "onCoreSecurity" event, this event always * @param GetResponseEvent $event the "onCoreRequest" event, this event always
* has the kernel as target * has the kernel as target
* @param Request $request * @param Request $request
* @param AuthenticationException $exception * @param AuthenticationException $exception

View File

@ -22,7 +22,7 @@ interface AuthenticationSuccessHandlerInterface
* is called by authentication listeners inheriting from * is called by authentication listeners inheriting from
* AbstractAuthenticationListener. * AbstractAuthenticationListener.
* *
* @param GetResponseEvent $event the "onCoreSecurity" event, this event always * @param GetResponseEvent $event the "onCoreRequest" event, this event always
* has the kernel as target * has the kernel as target
* @param Request $request * @param Request $request
* @param TokenInterface $token * @param TokenInterface $token

View File

@ -26,7 +26,7 @@ interface AuthenticationEntryPointInterface
/** /**
* Starts the authentication scheme. * 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 object $request The request that resulted in an AuthenticationException
* @param AuthenticationException $authException The exception that started the authentication process * @param AuthenticationException $authException The exception that started the authentication process
*/ */

View File

@ -107,7 +107,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
* *
* @param GetResponseEvent $event A GetResponseEvent instance * @param GetResponseEvent $event A GetResponseEvent instance
*/ */
public final function onCoreSecurity(GetResponseEvent $event) public final function handle(GetResponseEvent $event)
{ {
$request = $event->getRequest(); $request = $event->getRequest();

View File

@ -52,7 +52,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
* *
* @param GetResponseEvent $event A GetResponseEvent instance * @param GetResponseEvent $event A GetResponseEvent instance
*/ */
public final function onCoreSecurity(GetResponseEvent $event) public final function handle(GetResponseEvent $event)
{ {
$request = $event->getRequest(); $request = $event->getRequest();

View File

@ -48,7 +48,7 @@ class AccessListener implements ListenerInterface
* *
* @param GetResponseEvent $event A GetResponseEvent instance * @param GetResponseEvent $event A GetResponseEvent instance
*/ */
public function onCoreSecurity(GetResponseEvent $event) public function handle(GetResponseEvent $event)
{ {
if (null === $token = $this->context->getToken()) { if (null === $token = $this->context->getToken()) {
throw new AuthenticationCredentialsNotFoundException('A Token was not found in the SecurityContext.'); throw new AuthenticationCredentialsNotFoundException('A Token was not found in the SecurityContext.');

View File

@ -41,7 +41,7 @@ class AnonymousAuthenticationListener implements ListenerInterface
* *
* @param GetResponseEvent $event A GetResponseEvent instance * @param GetResponseEvent $event A GetResponseEvent instance
*/ */
public function onCoreSecurity(GetResponseEvent $event) public function handle(GetResponseEvent $event)
{ {
if (null !== $this->context->getToken()) { if (null !== $this->context->getToken()) {
return; return;

View File

@ -53,7 +53,7 @@ class BasicAuthenticationListener implements ListenerInterface
* *
* @param GetResponseEvent $event A GetResponseEvent instance * @param GetResponseEvent $event A GetResponseEvent instance
*/ */
public function onCoreSecurity(GetResponseEvent $event) public function handle(GetResponseEvent $event)
{ {
$request = $event->getRequest(); $request = $event->getRequest();

View File

@ -41,7 +41,7 @@ class ChannelListener implements ListenerInterface
* *
* @param GetResponseEvent $event A GetResponseEvent instance * @param GetResponseEvent $event A GetResponseEvent instance
*/ */
public function onCoreSecurity(GetResponseEvent $event) public function handle(GetResponseEvent $event)
{ {
$request = $event->getRequest(); $request = $event->getRequest();

View File

@ -58,7 +58,7 @@ class ContextListener implements ListenerInterface
* *
* @param GetResponseEvent $event A GetResponseEvent instance * @param GetResponseEvent $event A GetResponseEvent instance
*/ */
public function onCoreSecurity(GetResponseEvent $event) public function handle(GetResponseEvent $event)
{ {
$request = $event->getRequest(); $request = $event->getRequest();

View File

@ -56,7 +56,7 @@ class DigestAuthenticationListener implements ListenerInterface
* *
* @param GetResponseEvent $event A GetResponseEvent instance * @param GetResponseEvent $event A GetResponseEvent instance
*/ */
public function onCoreSecurity(GetResponseEvent $event) public function handle(GetResponseEvent $event)
{ {
$request = $event->getRequest(); $request = $event->getRequest();

View File

@ -26,5 +26,5 @@ interface ListenerInterface
* *
* @param GetResponseEvent $event * @param GetResponseEvent $event
*/ */
function onCoreSecurity(GetResponseEvent $event); function handle(GetResponseEvent $event);
} }

View File

@ -65,7 +65,7 @@ class LogoutListener implements ListenerInterface
* *
* @param GetResponseEvent $event A GetResponseEvent instance * @param GetResponseEvent $event A GetResponseEvent instance
*/ */
public function onCoreSecurity(GetResponseEvent $event) public function handle(GetResponseEvent $event)
{ {
$request = $event->getRequest(); $request = $event->getRequest();

View File

@ -62,7 +62,7 @@ class RememberMeListener implements ListenerInterface
* *
* @param GetResponseEvent $event A GetResponseEvent instance * @param GetResponseEvent $event A GetResponseEvent instance
*/ */
public function onCoreSecurity(GetResponseEvent $event) public function handle(GetResponseEvent $event)
{ {
if (null !== $this->securityContext->getToken()) { if (null !== $this->securityContext->getToken()) {
return; return;

View File

@ -73,7 +73,7 @@ class SwitchUserListener implements ListenerInterface
* *
* @param GetResponseEvent $event A GetResponseEvent instance * @param GetResponseEvent $event A GetResponseEvent instance
*/ */
public function onCoreSecurity(GetResponseEvent $event) public function handle(GetResponseEvent $event)
{ {
$request = $event->getRequest(); $request = $event->getRequest();

View File

@ -27,7 +27,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase
->method('setToken') ->method('setToken')
; ;
$this->assertNull($listener->onCoreSecurity($this->getGetResponseEvent())); $this->assertNull($listener->handle($this->getGetResponseEvent()));
} }
public function testOnCoreSecurityDoesNothingWhenNoCookieIsSet() public function testOnCoreSecurityDoesNothingWhenNoCookieIsSet()
@ -53,7 +53,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue(new Request())) ->will($this->returnValue(new Request()))
; ;
$this->assertNull($listener->onCoreSecurity($event)); $this->assertNull($listener->handle($event));
} }
public function testOnCoreSecurityIgnoresAuthenticationExceptionThrownByAuthenticationManagerImplementation() public function testOnCoreSecurityIgnoresAuthenticationExceptionThrownByAuthenticationManagerImplementation()
@ -91,7 +91,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue(new Request())) ->will($this->returnValue(new Request()))
; ;
$listener->onCoreSecurity($event); $listener->handle($event);
} }
public function testOnCoreSecurity() public function testOnCoreSecurity()
@ -130,7 +130,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue(new Request())) ->will($this->returnValue(new Request()))
; ;
$listener->onCoreSecurity($event); $listener->handle($event);
} }
protected function getGetResponseEvent() protected function getGetResponseEvent()