summaryrefslogtreecommitdiffstats
path: root/Core/Authentication/Provider
diff options
context:
space:
mode:
Diffstat (limited to 'Core/Authentication/Provider')
-rw-r--r--Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php21
-rw-r--r--Core/Authentication/Provider/SimpleAuthenticationProvider.php6
2 files changed, 10 insertions, 17 deletions
diff --git a/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php b/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
index 3affd78..f4d0959 100644
--- a/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
+++ b/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
@@ -47,23 +47,22 @@ class PreAuthenticatedAuthenticationProvider implements AuthenticationProviderIn
$this->providerKey = $providerKey;
}
- /**
- * {@inheritdoc}
- */
- public function authenticate(TokenInterface $token)
- {
- if (!$this->supports($token)) {
- return null;
- }
-
+ /**
+ * {@inheritdoc}
+ */
+ public function authenticate(TokenInterface $token)
+ {
+ if (!$this->supports($token)) {
+ return null;
+ }
if (!$user = $token->getUser()) {
throw new BadCredentialsException('No pre-authenticated principal found in request.');
}
-/*
+ /*
if (null === $token->getCredentials()) {
throw new BadCredentialsException('No pre-authenticated credentials found in request.');
}
-*/
+ */
$user = $this->userProvider->loadUserByUsername($user);
$this->userChecker->checkPostAuth($user);
diff --git a/Core/Authentication/Provider/SimpleAuthenticationProvider.php b/Core/Authentication/Provider/SimpleAuthenticationProvider.php
index 8f8cceb..ffbc72c 100644
--- a/Core/Authentication/Provider/SimpleAuthenticationProvider.php
+++ b/Core/Authentication/Provider/SimpleAuthenticationProvider.php
@@ -11,13 +11,7 @@
namespace Symfony\Component\Security\Core\Authentication\Provider;
-use Symfony\Component\Security\Core\Encoder\EncoderFactoryInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
-use Symfony\Component\Security\Core\User\UserCheckerInterface;
-use Symfony\Component\Security\Core\User\UserInterface;
-use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
-use Symfony\Component\Security\Core\Exception\AuthenticationServiceException;
-use Symfony\Component\Security\Core\Exception\BadCredentialsException;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface;
use Symfony\Component\Security\Core\Exception\AuthenticationException;