summaryrefslogtreecommitdiffstats
path: root/Core/Authentication/Provider
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2014-04-18 22:40:13 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2014-04-18 22:40:13 +0200
commit50b628485926fe99395dc9c5b0f3d5d5b377222b (patch)
treec9b751dec6f40dacfbc0f191f73b0141f9a831c9 /Core/Authentication/Provider
parentf96131c5c32c9d9260028968dd5ba38e0bad91ac (diff)
parent2a3393fbb9f593f6d0958a3058466593d6f9f69f (diff)
downloadsymfony-security-50b628485926fe99395dc9c5b0f3d5d5b377222b.zip
symfony-security-50b628485926fe99395dc9c5b0f3d5d5b377222b.tar.gz
symfony-security-50b628485926fe99395dc9c5b0f3d5d5b377222b.tar.bz2
Merge branch '2.4'
* 2.4: unified return null usages [Validator] added Japanese translation Textarea value should default to empty string instead of null. Fix doc blocks [Process] Fix #10681, process are failing on Windows Server 2003 updated doc [Security] fix DBAL connection typehint [HttpFoundation] status 201 is allowed to have a body unified return null usages Conflicts: src/Symfony/Component/DependencyInjection/ContainerBuilder.php src/Symfony/Component/DomCrawler/Crawler.php src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
Diffstat (limited to 'Core/Authentication/Provider')
-rw-r--r--Core/Authentication/Provider/AnonymousAuthenticationProvider.php2
-rw-r--r--Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php3
-rw-r--r--Core/Authentication/Provider/UserAuthenticationProvider.php2
3 files changed, 4 insertions, 3 deletions
diff --git a/Core/Authentication/Provider/AnonymousAuthenticationProvider.php b/Core/Authentication/Provider/AnonymousAuthenticationProvider.php
index ea91075..7fbbf85 100644
--- a/Core/Authentication/Provider/AnonymousAuthenticationProvider.php
+++ b/Core/Authentication/Provider/AnonymousAuthenticationProvider.php
@@ -40,7 +40,7 @@ class AnonymousAuthenticationProvider implements AuthenticationProviderInterface
public function authenticate(TokenInterface $token)
{
if (!$this->supports($token)) {
- return null;
+ return;
}
if ($this->key !== $token->getKey()) {
diff --git a/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php b/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
index f4d0959..11c3cda 100644
--- a/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
+++ b/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
@@ -53,8 +53,9 @@ class PreAuthenticatedAuthenticationProvider implements AuthenticationProviderIn
public function authenticate(TokenInterface $token)
{
if (!$this->supports($token)) {
- return null;
+ return;
}
+
if (!$user = $token->getUser()) {
throw new BadCredentialsException('No pre-authenticated principal found in request.');
}
diff --git a/Core/Authentication/Provider/UserAuthenticationProvider.php b/Core/Authentication/Provider/UserAuthenticationProvider.php
index 14fbdda..3728c01 100644
--- a/Core/Authentication/Provider/UserAuthenticationProvider.php
+++ b/Core/Authentication/Provider/UserAuthenticationProvider.php
@@ -58,7 +58,7 @@ abstract class UserAuthenticationProvider implements AuthenticationProviderInter
public function authenticate(TokenInterface $token)
{
if (!$this->supports($token)) {
- return null;
+ return;
}
$username = $token->getUsername();