summaryrefslogtreecommitdiffstats
path: root/Core/Authentication
diff options
context:
space:
mode:
authorAlexander <iam.asm89@gmail.com>2012-07-15 17:38:53 +0200
committerAlexander <iam.asm89@gmail.com>2013-01-07 20:58:58 +0100
commit2a58d99772d05834fb6687268d49f256e55df4bb (patch)
tree311ece2578e2eb51590f19bcf937afea77dee312 /Core/Authentication
parent7f5659fa1622474a60de0578f0c7014b22746da2 (diff)
downloadsymfony-security-2a58d99772d05834fb6687268d49f256e55df4bb.zip
symfony-security-2a58d99772d05834fb6687268d49f256e55df4bb.tar.gz
symfony-security-2a58d99772d05834fb6687268d49f256e55df4bb.tar.bz2
[Security] Introduced `UsernameNotFoundException#get/setUsername`
Diffstat (limited to 'Core/Authentication')
-rw-r--r--Core/Authentication/Provider/DaoAuthenticationProvider.php1
-rw-r--r--Core/Authentication/Provider/UserAuthenticationProvider.php1
2 files changed, 2 insertions, 0 deletions
diff --git a/Core/Authentication/Provider/DaoAuthenticationProvider.php b/Core/Authentication/Provider/DaoAuthenticationProvider.php
index 8647382..a9a2205 100644
--- a/Core/Authentication/Provider/DaoAuthenticationProvider.php
+++ b/Core/Authentication/Provider/DaoAuthenticationProvider.php
@@ -88,6 +88,7 @@ class DaoAuthenticationProvider extends UserAuthenticationProvider
return $user;
} catch (UsernameNotFoundException $notFound) {
+ $notFound->setUsername($username);
throw $notFound;
} catch (\Exception $repositoryProblem) {
$ex = new AuthenticationServiceException($repositoryProblem->getMessage(), 0, $repositoryProblem);
diff --git a/Core/Authentication/Provider/UserAuthenticationProvider.php b/Core/Authentication/Provider/UserAuthenticationProvider.php
index ed8f499..626f50b 100644
--- a/Core/Authentication/Provider/UserAuthenticationProvider.php
+++ b/Core/Authentication/Provider/UserAuthenticationProvider.php
@@ -71,6 +71,7 @@ abstract class UserAuthenticationProvider implements AuthenticationProviderInter
if ($this->hideUserNotFoundExceptions) {
throw new BadCredentialsException('Bad credentials', 0, $notFound);
}
+ $notFound->setUsername($username);
throw $notFound;
}