minor #38802 [Security] Remove dead references to AnonymousAuthenticator (chalasr)

This PR was merged into the 5.1 branch.

Discussion
----------

[Security] Remove dead references to AnonymousAuthenticator

| Q             | A
| ------------- | ---
| Branch?       | 5.1
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Commits
-------

9376e8778d [Security] Remove dead references to AnonymousAuthenticator
This commit is contained in:
Alexander M. Turek 2020-10-25 23:33:47 +01:00
commit 244867d00f
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]);