summaryrefslogtreecommitdiffstats
path: root/Http/Firewall
diff options
context:
space:
mode:
Diffstat (limited to 'Http/Firewall')
-rw-r--r--Http/Firewall/AbstractPreAuthenticatedListener.php8
-rw-r--r--Http/Firewall/BasicAuthenticationListener.php6
-rw-r--r--Http/Firewall/ContextListener.php6
-rw-r--r--Http/Firewall/DigestAuthenticationListener.php2
-rw-r--r--Http/Firewall/RememberMeListener.php4
5 files changed, 13 insertions, 13 deletions
diff --git a/Http/Firewall/AbstractPreAuthenticatedListener.php b/Http/Firewall/AbstractPreAuthenticatedListener.php
index f040107..9973683 100644
--- a/Http/Firewall/AbstractPreAuthenticatedListener.php
+++ b/Http/Firewall/AbstractPreAuthenticatedListener.php
@@ -62,8 +62,8 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
try {
list($user, $credentials) = $this->getPreAuthenticatedData($request);
- } catch (BadCredentialsException $exception) {
- $this->clearToken($exception);
+ } catch (BadCredentialsException $e) {
+ $this->clearToken($e);
return;
}
@@ -90,8 +90,8 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
$loginEvent = new InteractiveLoginEvent($request, $token);
$this->dispatcher->dispatch(SecurityEvents::INTERACTIVE_LOGIN, $loginEvent);
}
- } catch (AuthenticationException $failed) {
- $this->clearToken($failed);
+ } catch (AuthenticationException $e) {
+ $this->clearToken($e);
}
}
diff --git a/Http/Firewall/BasicAuthenticationListener.php b/Http/Firewall/BasicAuthenticationListener.php
index bfc4abc..eed9838 100644
--- a/Http/Firewall/BasicAuthenticationListener.php
+++ b/Http/Firewall/BasicAuthenticationListener.php
@@ -73,21 +73,21 @@ class BasicAuthenticationListener implements ListenerInterface
try {
$token = $this->authenticationManager->authenticate(new UsernamePasswordToken($username, $request->headers->get('PHP_AUTH_PW'), $this->providerKey));
$this->securityContext->setToken($token);
- } catch (AuthenticationException $failed) {
+ } catch (AuthenticationException $e) {
$token = $this->securityContext->getToken();
if ($token instanceof UsernamePasswordToken && $this->providerKey === $token->getProviderKey()) {
$this->securityContext->setToken(null);
}
if (null !== $this->logger) {
- $this->logger->info(sprintf('Authentication request failed for user "%s": %s', $username, $failed->getMessage()));
+ $this->logger->info(sprintf('Authentication request failed for user "%s": %s', $username, $e->getMessage()));
}
if ($this->ignoreFailure) {
return;
}
- $event->setResponse($this->authenticationEntryPoint->start($request, $failed));
+ $event->setResponse($this->authenticationEntryPoint->start($request, $e));
}
}
}
diff --git a/Http/Firewall/ContextListener.php b/Http/Firewall/ContextListener.php
index c80fff3..43ad31d 100644
--- a/Http/Firewall/ContextListener.php
+++ b/Http/Firewall/ContextListener.php
@@ -167,11 +167,11 @@ class ContextListener implements ListenerInterface
}
return $token;
- } catch (UnsupportedUserException $unsupported) {
+ } catch (UnsupportedUserException $e) {
// let's try the next user provider
- } catch (UsernameNotFoundException $notFound) {
+ } catch (UsernameNotFoundException $e) {
if (null !== $this->logger) {
- $this->logger->warning(sprintf('Username "%s" could not be found.', $notFound->getUsername()));
+ $this->logger->warning(sprintf('Username "%s" could not be found.', $e->getUsername()));
}
return;
diff --git a/Http/Firewall/DigestAuthenticationListener.php b/Http/Firewall/DigestAuthenticationListener.php
index 358c3c7..2737069 100644
--- a/Http/Firewall/DigestAuthenticationListener.php
+++ b/Http/Firewall/DigestAuthenticationListener.php
@@ -93,7 +93,7 @@ class DigestAuthenticationListener implements ListenerInterface
}
$serverDigestMd5 = $digestAuth->calculateServerDigest($user->getPassword(), $request->getMethod());
- } catch (UsernameNotFoundException $notFound) {
+ } catch (UsernameNotFoundException $e) {
$this->fail($event, $request, new BadCredentialsException(sprintf('Username %s not found.', $digestAuth->getUsername())));
return;
diff --git a/Http/Firewall/RememberMeListener.php b/Http/Firewall/RememberMeListener.php
index beacff3..942e537 100644
--- a/Http/Firewall/RememberMeListener.php
+++ b/Http/Firewall/RememberMeListener.php
@@ -80,12 +80,12 @@ class RememberMeListener implements ListenerInterface
if (null !== $this->logger) {
$this->logger->debug('SecurityContext populated with remember-me token.');
}
- } catch (AuthenticationException $failed) {
+ } catch (AuthenticationException $e) {
if (null !== $this->logger) {
$this->logger->warning(
'SecurityContext not populated with remember-me token as the'
.' AuthenticationManager rejected the AuthenticationToken returned'
- .' by the RememberMeServices: '.$failed->getMessage()
+ .' by the RememberMeServices: '.$e->getMessage()
);
}