You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -64,7 +64,7 @@ public function onAuthenticationSuccess(Request $request, TokenInterface $token)
64
64
}
65
65
66
66
if (null !== $response) {
67
-
thrownew \UnexpectedValueException(sprintf('The %s::onAuthenticationSuccess method must return null to use the default success handler, or a Response object', get_class($this->simpleAuthenticator)));
67
+
thrownew \UnexpectedValueException(sprintf('The %s::onAuthenticationSuccess method must return null to use the default success handler, or a Response object', \get_class($this->simpleAuthenticator)));
68
68
}
69
69
}
70
70
@@ -82,7 +82,7 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
82
82
{
83
83
if ($this->simpleAuthenticatorinstanceof AuthenticationFailureHandlerInterface) {
84
84
if ($this->logger) {
85
-
$this->logger->debug('Selected an authentication failure handler.', array('handler' => get_class($this->simpleAuthenticator)));
85
+
$this->logger->debug('Selected an authentication failure handler.', array('handler' => \get_class($this->simpleAuthenticator)));
@@ -91,7 +91,7 @@ public function onAuthenticationFailure(Request $request, AuthenticationExceptio
91
91
}
92
92
93
93
if (null !== $response) {
94
-
thrownew \UnexpectedValueException(sprintf('The %s::onAuthenticationFailure method must return null to use the default failure handler, or a Response object', get_class($this->simpleAuthenticator)));
94
+
thrownew \UnexpectedValueException(sprintf('The %s::onAuthenticationFailure method must return null to use the default failure handler, or a Response object', \get_class($this->simpleAuthenticator)));
Copy file name to clipboardExpand all lines: Firewall/ContextListener.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ public function __construct(TokenStorageInterface $tokenStorage, array $userProv
47
47
48
48
foreach ($userProvidersas$userProvider) {
49
49
if (!$userProviderinstanceof UserProviderInterface) {
50
-
thrownew \InvalidArgumentException(sprintf('User provider "%s" must implement "Symfony\Component\Security\Core\User\UserProviderInterface".', get_class($userProvider)));
50
+
thrownew \InvalidArgumentException(sprintf('User provider "%s" must implement "Symfony\Component\Security\Core\User\UserProviderInterface".', \get_class($userProvider)));
51
51
}
52
52
}
53
53
@@ -150,15 +150,15 @@ protected function refreshUser(TokenInterface $token)
150
150
$token->setUser($refreshedUser);
151
151
152
152
if (null !== $this->logger) {
153
-
$this->logger->debug('User was reloaded from a user provider.', array('username' => $refreshedUser->getUsername(), 'provider' => get_class($provider)));
153
+
$this->logger->debug('User was reloaded from a user provider.', array('username' => $refreshedUser->getUsername(), 'provider' => \get_class($provider)));
154
154
}
155
155
156
156
return$token;
157
157
} catch (UnsupportedUserException$e) {
158
158
// let's try the next user provider
159
159
} catch (UsernameNotFoundException$e) {
160
160
if (null !== $this->logger) {
161
-
$this->logger->warning('Username could not be found in the selected user provider.', array('username' => $e->getUsername(), 'provider' => get_class($provider)));
161
+
$this->logger->warning('Username could not be found in the selected user provider.', array('username' => $e->getUsername(), 'provider' => \get_class($provider)));
162
162
}
163
163
164
164
$userNotFoundByProvider = true;
@@ -169,7 +169,7 @@ protected function refreshUser(TokenInterface $token)
169
169
returnnull;
170
170
}
171
171
172
-
thrownew \RuntimeException(sprintf('There is no user provider for user "%s".', get_class($user)));
172
+
thrownew \RuntimeException(sprintf('There is no user provider for user "%s".', \get_class($user)));
thrownew \UnexpectedValueException(sprintf('The %s::onAuthenticationFailure method must return null or a Response object', get_class($this->simpleAuthenticator)));
123
+
thrownew \UnexpectedValueException(sprintf('The %s::onAuthenticationFailure method must return null or a Response object', \get_class($this->simpleAuthenticator)));
124
124
}
125
125
}
126
126
@@ -132,7 +132,7 @@ public function handle(GetResponseEvent $event)
132
132
if ($responseinstanceof Response) {
133
133
$event->setResponse($response);
134
134
} elseif (null !== $response) {
135
-
thrownew \UnexpectedValueException(sprintf('The %s::onAuthenticationSuccess method must return null or a Response object', get_class($this->simpleAuthenticator)));
135
+
thrownew \UnexpectedValueException(sprintf('The %s::onAuthenticationSuccess method must return null or a Response object', \get_class($this->simpleAuthenticator)));
thrownewAuthenticationException('The cookie is invalid.');
36
36
}
37
37
@@ -50,7 +50,7 @@ protected function processAutoLoginCookie(array $cookieParts, Request $request)
50
50
}
51
51
52
52
if (!$userinstanceof UserInterface) {
53
-
thrownew \RuntimeException(sprintf('The UserProviderInterface implementation must return an instance of UserInterface, but returned "%s".', get_class($user)));
53
+
thrownew \RuntimeException(sprintf('The UserProviderInterface implementation must return an instance of UserInterface, but returned "%s".', \get_class($user)));
54
54
}
55
55
56
56
if (true !== hash_equals($this->generateCookieHash($class, $username, $expires, $user->getPassword()), $hash)) {
0 commit comments