summaryrefslogtreecommitdiffstats
path: root/Http
diff options
context:
space:
mode:
Diffstat (limited to 'Http')
-rw-r--r--Http/Firewall/AbstractAuthenticationListener.php7
-rw-r--r--Http/Firewall/AbstractPreAuthenticatedListener.php4
-rw-r--r--Http/Firewall/BasicAuthenticationListener.php4
-rw-r--r--Http/Firewall/ContextListener.php2
-rw-r--r--Http/Firewall/DigestAuthenticationListener.php4
-rw-r--r--Http/Firewall/ExceptionListener.php4
-rw-r--r--Http/Firewall/RememberMeListener.php2
-rw-r--r--Http/Firewall/SwitchUserListener.php4
-rw-r--r--Http/Firewall/UsernamePasswordFormAuthenticationListener.php2
-rw-r--r--Http/RememberMe/AbstractRememberMeServices.php6
10 files changed, 21 insertions, 18 deletions
diff --git a/Http/Firewall/AbstractAuthenticationListener.php b/Http/Firewall/AbstractAuthenticationListener.php
index 2b2db40..028e968 100644
--- a/Http/Firewall/AbstractAuthenticationListener.php
+++ b/Http/Firewall/AbstractAuthenticationListener.php
@@ -169,7 +169,7 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
private function onFailure(GetResponseEvent $event, Request $request, AuthenticationException $failed)
{
if (null !== $this->logger) {
- $this->logger->debug(sprintf('Authentication request failed: %s', $failed->getMessage()));
+ $this->logger->info(sprintf('Authentication request failed: %s', $failed->getMessage()));
}
$this->securityContext->setToken(null);
@@ -205,7 +205,10 @@ abstract class AbstractAuthenticationListener implements ListenerInterface
private function onSuccess(GetResponseEvent $event, Request $request, TokenInterface $token)
{
if (null !== $this->logger) {
- $this->logger->debug('User has been authenticated successfully');
+ $this->logger->info(sprintf(
+ 'User "%s" has been authenticated successfully',
+ $token->getUsername()
+ ));
}
$this->securityContext->setToken($token);
diff --git a/Http/Firewall/AbstractPreAuthenticatedListener.php b/Http/Firewall/AbstractPreAuthenticatedListener.php
index 88faa27..9cd5a49 100644
--- a/Http/Firewall/AbstractPreAuthenticatedListener.php
+++ b/Http/Firewall/AbstractPreAuthenticatedListener.php
@@ -76,7 +76,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
$token = $this->authenticationManager->authenticate(new PreAuthenticatedToken($user, $credentials, $this->providerKey));
if (null !== $this->logger) {
- $this->logger->debug(sprintf('Authentication success: %s', $token));
+ $this->logger->info(sprintf('Authentication success: %s', $token));
}
$this->securityContext->setToken($token);
@@ -88,7 +88,7 @@ abstract class AbstractPreAuthenticatedListener implements ListenerInterface
$this->securityContext->setToken(null);
if (null !== $this->logger) {
- $this->logger->debug(sprintf("Cleared security context due to exception: %s", $failed->getMessage()));
+ $this->logger->info(sprintf("Cleared security context due to exception: %s", $failed->getMessage()));
}
}
}
diff --git a/Http/Firewall/BasicAuthenticationListener.php b/Http/Firewall/BasicAuthenticationListener.php
index d35d8d5..da2e435 100644
--- a/Http/Firewall/BasicAuthenticationListener.php
+++ b/Http/Firewall/BasicAuthenticationListener.php
@@ -68,7 +68,7 @@ class BasicAuthenticationListener implements ListenerInterface
}
if (null !== $this->logger) {
- $this->logger->debug(sprintf('Basic Authentication Authorization header found for user "%s"', $username));
+ $this->logger->info(sprintf('Basic Authentication Authorization header found for user "%s"', $username));
}
try {
@@ -78,7 +78,7 @@ class BasicAuthenticationListener implements ListenerInterface
$this->securityContext->setToken(null);
if (null !== $this->logger) {
- $this->logger->debug(sprintf('Authentication request failed: %s', $failed->getMessage()));
+ $this->logger->info(sprintf('Authentication request failed for user "%s": %s', $username, $failed->getMessage()));
}
if ($this->ignoreFailure) {
diff --git a/Http/Firewall/ContextListener.php b/Http/Firewall/ContextListener.php
index 331a1e3..8226fe4 100644
--- a/Http/Firewall/ContextListener.php
+++ b/Http/Firewall/ContextListener.php
@@ -138,7 +138,7 @@ class ContextListener implements ListenerInterface
// let's try the next user provider
} catch (UsernameNotFoundException $notFound) {
if (null !== $this->logger) {
- $this->logger->debug(sprintf('Username "%s" could not be found.', $user->getUsername()));
+ $this->logger->warn(sprintf('Username "%s" could not be found.', $user->getUsername()));
}
return null;
diff --git a/Http/Firewall/DigestAuthenticationListener.php b/Http/Firewall/DigestAuthenticationListener.php
index 867899e..ffb06a3 100644
--- a/Http/Firewall/DigestAuthenticationListener.php
+++ b/Http/Firewall/DigestAuthenticationListener.php
@@ -115,7 +115,7 @@ class DigestAuthenticationListener implements ListenerInterface
}
if (null !== $this->logger) {
- $this->logger->debug(sprintf('Authentication success for user "%s" with response "%s"', $digestAuth->getUsername(), $digestAuth->getResponse()));
+ $this->logger->info(sprintf('Authentication success for user "%s" with response "%s"', $digestAuth->getUsername(), $digestAuth->getResponse()));
}
$this->securityContext->setToken(new UsernamePasswordToken($user, $user->getPassword(), $this->providerKey));
@@ -126,7 +126,7 @@ class DigestAuthenticationListener implements ListenerInterface
$this->securityContext->setToken(null);
if (null !== $this->logger) {
- $this->logger->debug($authException);
+ $this->logger->info($authException);
}
$event->setResponse($this->authenticationEntryPoint->start($request, $authException));
diff --git a/Http/Firewall/ExceptionListener.php b/Http/Firewall/ExceptionListener.php
index 4840a63..9143361 100644
--- a/Http/Firewall/ExceptionListener.php
+++ b/Http/Firewall/ExceptionListener.php
@@ -88,7 +88,7 @@ class ExceptionListener
$token = $this->context->getToken();
if (!$this->authenticationTrustResolver->isFullFledged($token)) {
if (null !== $this->logger) {
- $this->logger->info('Access denied (user is not fully authenticated); redirecting to authentication entry point');
+ $this->logger->debug('Access denied (user is not fully authenticated); redirecting to authentication entry point');
}
try {
@@ -100,7 +100,7 @@ class ExceptionListener
}
} else {
if (null !== $this->logger) {
- $this->logger->info('Access is denied (and user is neither anonymous, nor remember-me)');
+ $this->logger->debug('Access is denied (and user is neither anonymous, nor remember-me)');
}
try {
diff --git a/Http/Firewall/RememberMeListener.php b/Http/Firewall/RememberMeListener.php
index 10ed8c6..07aa8f5 100644
--- a/Http/Firewall/RememberMeListener.php
+++ b/Http/Firewall/RememberMeListener.php
@@ -88,7 +88,7 @@ class RememberMeListener implements ListenerInterface
}
} catch (AuthenticationException $failed) {
if (null !== $this->logger) {
- $this->logger->debug(
+ $this->logger->warn(
'SecurityContext not populated with remember-me token as the'
.' AuthenticationManager rejected the AuthenticationToken returned'
.' by the RememberMeServices: '.$failed->getMessage()
diff --git a/Http/Firewall/SwitchUserListener.php b/Http/Firewall/SwitchUserListener.php
index 0977cb1..3cefdd7 100644
--- a/Http/Firewall/SwitchUserListener.php
+++ b/Http/Firewall/SwitchUserListener.php
@@ -88,7 +88,7 @@ class SwitchUserListener implements ListenerInterface
$this->securityContext->setToken($this->attemptSwitchUser($request));
} catch (AuthenticationException $e) {
if (null !== $this->logger) {
- $this->logger->debug(sprintf('Switch User failed: "%s"', $e->getMessage()));
+ $this->logger->warn(sprintf('Switch User failed: "%s"', $e->getMessage()));
}
}
}
@@ -120,7 +120,7 @@ class SwitchUserListener implements ListenerInterface
$username = $request->get($this->usernameParameter);
if (null !== $this->logger) {
- $this->logger->debug(sprintf('Attempt to switch to user "%s"', $username));
+ $this->logger->info(sprintf('Attempt to switch to user "%s"', $username));
}
$user = $this->provider->loadUserByUsername($username);
diff --git a/Http/Firewall/UsernamePasswordFormAuthenticationListener.php b/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
index 51546c0..859bb20 100644
--- a/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
+++ b/Http/Firewall/UsernamePasswordFormAuthenticationListener.php
@@ -56,7 +56,7 @@ class UsernamePasswordFormAuthenticationListener extends AbstractAuthenticationL
{
if ($this->options['post_only'] && 'post' !== strtolower($request->getMethod())) {
if (null !== $this->logger) {
- $this->logger->debug(sprintf('Authentication method not supported: %s.', $request->getMethod()));
+ $this->logger->err(sprintf('Authentication method not supported: %s.', $request->getMethod()));
}
return null;
diff --git a/Http/RememberMe/AbstractRememberMeServices.php b/Http/RememberMe/AbstractRememberMeServices.php
index a7c63ef..74acdef 100644
--- a/Http/RememberMe/AbstractRememberMeServices.php
+++ b/Http/RememberMe/AbstractRememberMeServices.php
@@ -122,15 +122,15 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
throw $theft;
} catch (UsernameNotFoundException $notFound) {
if (null !== $this->logger) {
- $this->logger->debug('User for remember-me cookie not found.');
+ $this->logger->info('User for remember-me cookie not found.');
}
} catch (UnsupportedUserException $unSupported) {
if (null !== $this->logger) {
- $this->logger->debug('User class for remember-me cookie not supported.');
+ $this->logger->err('User class for remember-me cookie not supported.');
}
} catch (AuthenticationException $invalid) {
if (null !== $this->logger) {
- $this->logger->debug('Remember-Me authentication failed: '.$invalid->getMessage());
+ $this->logger->err('Remember-Me authentication failed: '.$invalid->getMessage());
}
}