[Security] Remove dead references to AnonymousAuthenticator
This commit is contained in:
parent
e9dad88c01
commit
9376e8778d
@ -129,8 +129,7 @@ class AuthenticatorManager implements AuthenticatorManagerInterface, UserAuthent
|
|||||||
foreach ($authenticators as $authenticator) {
|
foreach ($authenticators as $authenticator) {
|
||||||
// recheck if the authenticator still supports the listener. supports() is called
|
// recheck if the authenticator still supports the listener. supports() is called
|
||||||
// eagerly (before token storage is initialized), whereas authenticate() is called
|
// eagerly (before token storage is initialized), whereas authenticate() is called
|
||||||
// lazily (after initialization). This is important for e.g. the AnonymousAuthenticator
|
// lazily (after initialization).
|
||||||
// as its support is relying on the (initialized) token in the TokenStorage.
|
|
||||||
if (false === $authenticator->supports($request)) {
|
if (false === $authenticator->supports($request)) {
|
||||||
if (null !== $this->logger) {
|
if (null !== $this->logger) {
|
||||||
$this->logger->debug('Skipping the "{authenticator}" authenticator as it did not support the request.', ['authenticator' => \get_class($authenticator)]);
|
$this->logger->debug('Skipping the "{authenticator}" authenticator as it did not support the request.', ['authenticator' => \get_class($authenticator)]);
|
||||||
|
@ -71,7 +71,7 @@ class AuthenticatorManagerTest extends TestCase
|
|||||||
{
|
{
|
||||||
// the attribute stores the supported authenticators, returning false now
|
// the attribute stores the supported authenticators, returning false now
|
||||||
// means support changed between calling supports() and authenticateRequest()
|
// 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);
|
$authenticator = $this->createAuthenticator(false);
|
||||||
$this->request->attributes->set('_security_authenticators', [$authenticator]);
|
$this->request->attributes->set('_security_authenticators', [$authenticator]);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user