Skip to content

Commit c06672a

Browse files
committed
Removing AnonymousPassport
This is not used - is leftover from the security component authenticator changes
1 parent b137f9a commit c06672a

File tree

3 files changed

+0
-33
lines changed

3 files changed

+0
-33
lines changed

Authentication/AuthenticatorManager.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
use Symfony\Component\Security\Core\User\UserInterface;
2323
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
2424
use Symfony\Component\Security\Http\Authenticator\InteractiveAuthenticatorInterface;
25-
use Symfony\Component\Security\Http\Authenticator\Passport\AnonymousPassport;
2625
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface;
2726
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
2827
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
@@ -219,10 +218,6 @@ private function handleAuthenticationSuccess(TokenInterface $authenticatedToken,
219218
$this->eventDispatcher->dispatch($loginEvent, SecurityEvents::INTERACTIVE_LOGIN);
220219
}
221220

222-
if ($passport instanceof AnonymousPassport) {
223-
return $response;
224-
}
225-
226221
$this->eventDispatcher->dispatch($loginSuccessEvent = new LoginSuccessEvent($authenticator, $passport, $authenticatedToken, $request, $response, $this->firewallName));
227222

228223
return $loginSuccessEvent->getResponse();

Authenticator/Passport/AnonymousPassport.php

Lines changed: 0 additions & 25 deletions
This file was deleted.

Tests/EventListener/UserProviderListenerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
use Symfony\Component\Security\Core\User\UserInterface;
1717
use Symfony\Component\Security\Core\User\UserProviderInterface;
1818
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
19-
use Symfony\Component\Security\Http\Authenticator\Passport\AnonymousPassport;
2019
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
21-
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
2220
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;
2321
use Symfony\Component\Security\Http\Event\CheckPassportEvent;
2422
use Symfony\Component\Security\Http\EventListener\UserProviderListener;
@@ -61,7 +59,6 @@ public function testNotOverrideUserLoader($passport)
6159

6260
public function provideCompletePassports()
6361
{
64-
yield [new AnonymousPassport()];
6562
yield [new SelfValidatingPassport(new UserBadge('wouter', function () {}))];
6663
}
6764

0 commit comments

Comments
 (0)