[Security] Remove dead references to AnonymousAuthenticator

This commit is contained in:
Robin Chalas 2020-10-25 23:11:08 +01:00
parent e9dad88c01
commit 9376e8778d
2 changed files with 2 additions and 3 deletions

View File

@ -129,8 +129,7 @@ class AuthenticatorManager implements AuthenticatorManagerInterface, UserAuthent
foreach ($authenticators as $authenticator) {
// recheck if the authenticator still supports the listener. supports() is called
// eagerly (before token storage is initialized), whereas authenticate() is called
// lazily (after initialization). This is important for e.g. the AnonymousAuthenticator
// as its support is relying on the (initialized) token in the TokenStorage.
// lazily (after initialization).
if (false === $authenticator->supports($request)) {
if (null !== $this->logger) {
$this->logger->debug('Skipping the "{authenticator}" authenticator as it did not support the request.', ['authenticator' => \get_class($authenticator)]);

View File

@ -71,7 +71,7 @@ class AuthenticatorManagerTest extends TestCase
{
// the attribute stores the supported authenticators, returning false now
// means support changed between calling supports() and authenticateRequest()
// (which is the case with lazy firewalls and e.g. the AnonymousAuthenticator)
// (which is the case with lazy firewalls)
$authenticator = $this->createAuthenticator(false);
$this->request->attributes->set('_security_authenticators', [$authenticator]);