diff options
Diffstat (limited to 'Http/EntryPoint')
5 files changed, 12 insertions, 12 deletions
diff --git a/Http/EntryPoint/AuthenticationEntryPointInterface.php b/Http/EntryPoint/AuthenticationEntryPointInterface.php index 98cbf28..ab0b220 100644 --- a/Http/EntryPoint/AuthenticationEntryPointInterface.php +++ b/Http/EntryPoint/AuthenticationEntryPointInterface.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Security\Http\EntryPoint; -use Symfony\Component\EventDispatcher\EventInterface; +use Symfony\Component\HttpKernel\Event\RequestEventArgs; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\HttpFoundation\Request; @@ -26,9 +26,9 @@ interface AuthenticationEntryPointInterface /** * Starts the authentication scheme. * - * @param EventInterface $event The "core.security" event + * @param RequestEventArgs $eventArgs The "onCoreSecurity" event * @param object $request The request that resulted in an AuthenticationException * @param AuthenticationException $authException The exception that started the authentication process */ - function start(EventInterface $event, Request $request, AuthenticationException $authException = null); + function start(RequestEventArgs $eventArgs, Request $request, AuthenticationException $authException = null); } diff --git a/Http/EntryPoint/BasicAuthenticationEntryPoint.php b/Http/EntryPoint/BasicAuthenticationEntryPoint.php index 907301c..8a564e6 100644 --- a/Http/EntryPoint/BasicAuthenticationEntryPoint.php +++ b/Http/EntryPoint/BasicAuthenticationEntryPoint.php @@ -11,11 +11,11 @@ namespace Symfony\Component\Security\Http\EntryPoint; -use Symfony\Component\EventDispatcher\EventInterface; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Event\RequestEventArgs; /** * BasicAuthenticationEntryPoint starts an HTTP Basic authentication. @@ -31,7 +31,7 @@ class BasicAuthenticationEntryPoint implements AuthenticationEntryPointInterface $this->realmName = $realmName; } - public function start(EventInterface $event, Request $request, AuthenticationException $authException = null) + public function start(RequestEventArgs $event, Request $request, AuthenticationException $authException = null) { $response = new Response(); $response->headers->set('WWW-Authenticate', sprintf('Basic realm="%s"', $this->realmName)); diff --git a/Http/EntryPoint/DigestAuthenticationEntryPoint.php b/Http/EntryPoint/DigestAuthenticationEntryPoint.php index ecc6178..3392065 100644 --- a/Http/EntryPoint/DigestAuthenticationEntryPoint.php +++ b/Http/EntryPoint/DigestAuthenticationEntryPoint.php @@ -11,13 +11,13 @@ namespace Symfony\Component\Security\Http\EntryPoint; -use Symfony\Component\EventDispatcher\EventInterface; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; use Symfony\Component\Security\Core\Exception\NonceExpiredException; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Event\RequestEventArgs; /** * DigestAuthenticationEntryPoint starts an HTTP Digest authentication. @@ -39,7 +39,7 @@ class DigestAuthenticationEntryPoint implements AuthenticationEntryPointInterfac $this->logger = $logger; } - public function start(EventInterface $event, Request $request, AuthenticationException $authException = null) + public function start(RequestEventArgs $eventArgs, Request $request, AuthenticationException $authException = null) { $expiryTime = microtime(true) + $this->nonceValiditySeconds * 1000; $signatureValue = md5($expiryTime.':'.$this->key); diff --git a/Http/EntryPoint/FormAuthenticationEntryPoint.php b/Http/EntryPoint/FormAuthenticationEntryPoint.php index 1f1cda7..b91d225 100644 --- a/Http/EntryPoint/FormAuthenticationEntryPoint.php +++ b/Http/EntryPoint/FormAuthenticationEntryPoint.php @@ -11,13 +11,13 @@ namespace Symfony\Component\Security\Http\EntryPoint; -use Symfony\Component\EventDispatcher\EventInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; use Symfony\Component\HttpKernel\HttpKernelInterface; +use Symfony\Component\HttpKernel\Event\RequestEventArgs; /** * FormAuthenticationEntryPoint starts an authentication via a login form. @@ -44,10 +44,10 @@ class FormAuthenticationEntryPoint implements AuthenticationEntryPointInterface /** * {@inheritdoc} */ - public function start(EventInterface $event, Request $request, AuthenticationException $authException = null) + public function start(RequestEventArgs $eventArgs, Request $request, AuthenticationException $authException = null) { if ($this->useForward) { - return $event->getSubject()->handle(Request::create($this->loginPath), HttpKernelInterface::SUB_REQUEST); + return $event->getKernel()->handle(Request::create($this->loginPath), HttpKernelInterface::SUB_REQUEST); } return new RedirectResponse(0 !== strpos($this->loginPath, 'http') ? $request->getUriForPath($this->loginPath) : $this->loginPath, 302); diff --git a/Http/EntryPoint/RetryAuthenticationEntryPoint.php b/Http/EntryPoint/RetryAuthenticationEntryPoint.php index cde65aa..1b5900b 100644 --- a/Http/EntryPoint/RetryAuthenticationEntryPoint.php +++ b/Http/EntryPoint/RetryAuthenticationEntryPoint.php @@ -11,12 +11,12 @@ namespace Symfony\Component\Security\Http\EntryPoint; -use Symfony\Component\EventDispatcher\EventInterface; use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpKernel\Event\RequestEventArgs; /** * RetryAuthenticationEntryPoint redirects URL based on the configured scheme. @@ -36,7 +36,7 @@ class RetryAuthenticationEntryPoint implements AuthenticationEntryPointInterface $this->httpsPort = $httpsPort; } - public function start(EventInterface $event, Request $request, AuthenticationException $authException = null) + public function start(RequestEventArgs $eventArgs, Request $request, AuthenticationException $authException = null) { $scheme = $request->isSecure() ? 'http' : 'https'; if ('http' === $scheme && 80 != $this->httpPort) { |