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
$this->logger->debug('Checking support on authenticator.', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($authenticator)]);
80
+
$this->logger->debug('Checking support on guard authenticator.', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]);
80
81
}
81
82
82
-
if ($authenticator->supports($request)) {
83
-
$guardAuthenticators[$key] = $authenticator;
83
+
if ($guardAuthenticator->supports($request)) {
84
+
$guardAuthenticators[$key] = $guardAuthenticator;
84
85
} elseif (null !== $this->logger) {
85
-
$this->logger->debug('Authenticator does not support the request.', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($authenticator)]);
86
+
$this->logger->debug('Guard authenticator does not support the request.', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]);
86
87
}
87
88
}
88
89
@@ -104,23 +105,9 @@ public function authenticate(RequestEvent $event)
$this->logger->debug('Passing guard token information to the GuardAuthenticationProvider', ['firewall_key' => $this->providerKey, 'authenticator' => \get_class($guardAuthenticator)]);
@@ -200,12 +187,20 @@ private function executeGuardAuthenticator(string $uniqueGuardKey, Authenticator
if (!$guardAuthenticatorinstanceof AuthenticatorInterface && !$guardAuthenticatorinstanceof CoreAuthenticatorInterface) {
206
-
thrownew \UnexpectedValueException('Invalid guard authenticator passed to '.__METHOD__.'. Expected AuthenticatorInterface of either Security Core or Security Guard.');
207
-
}
195
+
$this->rememberMeServices = $rememberMeServices;
196
+
}
208
197
198
+
/**
199
+
* Checks to see if remember me is supported in the authenticator and
200
+
* on the firewall. If it is, the RememberMeServicesInterface is notified.
@@ -98,27 +96,14 @@ public function authenticate(TokenInterface $token)
98
96
thrownewAuthenticationException(sprintf('Token with provider key "%s" did not originate from any of the guard authenticators of provider "%s".', $token->getGuardProviderKey(), $this->providerKey));
thrownewUsernameNotFoundException(sprintf('Null returned from "%s::getUser()".', get_debug_type($guardAuthenticator)));
124
109
}
@@ -135,14 +120,13 @@ private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticator
135
120
136
121
thrownewBadCredentialsException(sprintf('Authentication failed because "%s::checkCredentials()" did not return true.', get_debug_type($guardAuthenticator)));
if (!$authenticatedTokeninstanceof TokenInterface) {
147
131
thrownew \UnexpectedValueException(sprintf('The "%s::createAuthenticatedToken()" method must return a TokenInterface. You returned "%s".', get_debug_type($guardAuthenticator), get_debug_type($authenticatedToken)));
148
132
}
@@ -152,18 +136,29 @@ private function authenticateViaGuard(AuthenticatorInterface $guardAuthenticator
0 commit comments