minor #39138 [Security] Removing Unused AnonymousPassport (weaverryan)
This PR was merged into the 5.2 branch.
Discussion
----------
[Security] Removing Unused AnonymousPassport
| Q | A
| ------------- | ---
| Branch? | 5.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | none
| License | MIT
| Doc PR | not needed
This is not used - it's leftover from the security component authenticator changes. I double-checked with @wouterj.
Cheers!
Commits
-------
79571e0e77
Removing AnonymousPassport
This commit is contained in:
commit
ac2822f61f
@ -22,7 +22,6 @@ use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
|||||||
use Symfony\Component\Security\Core\User\UserInterface;
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
|
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
|
||||||
use Symfony\Component\Security\Http\Authenticator\InteractiveAuthenticatorInterface;
|
use Symfony\Component\Security\Http\Authenticator\InteractiveAuthenticatorInterface;
|
||||||
use Symfony\Component\Security\Http\Authenticator\Passport\AnonymousPassport;
|
|
||||||
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface;
|
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface;
|
||||||
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
|
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
|
||||||
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
|
use Symfony\Component\Security\Http\Authenticator\Passport\PassportInterface;
|
||||||
@ -219,10 +218,6 @@ class AuthenticatorManager implements AuthenticatorManagerInterface, UserAuthent
|
|||||||
$this->eventDispatcher->dispatch($loginEvent, SecurityEvents::INTERACTIVE_LOGIN);
|
$this->eventDispatcher->dispatch($loginEvent, SecurityEvents::INTERACTIVE_LOGIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($passport instanceof AnonymousPassport) {
|
|
||||||
return $response;
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->eventDispatcher->dispatch($loginSuccessEvent = new LoginSuccessEvent($authenticator, $passport, $authenticatedToken, $request, $response, $this->firewallName));
|
$this->eventDispatcher->dispatch($loginSuccessEvent = new LoginSuccessEvent($authenticator, $passport, $authenticatedToken, $request, $response, $this->firewallName));
|
||||||
|
|
||||||
return $loginSuccessEvent->getResponse();
|
return $loginSuccessEvent->getResponse();
|
||||||
|
@ -1,25 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This file is part of the Symfony package.
|
|
||||||
*
|
|
||||||
* (c) Fabien Potencier <fabien@symfony.com>
|
|
||||||
*
|
|
||||||
* For the full copyright and license information, please view the LICENSE
|
|
||||||
* file that was distributed with this source code.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Symfony\Component\Security\Http\Authenticator\Passport;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A passport used during anonymous authentication.
|
|
||||||
*
|
|
||||||
* @author Wouter de Jong <wouter@wouterj.nl>
|
|
||||||
*
|
|
||||||
* @internal
|
|
||||||
* @experimental in 5.2
|
|
||||||
*/
|
|
||||||
class AnonymousPassport implements PassportInterface
|
|
||||||
{
|
|
||||||
use PassportTrait;
|
|
||||||
}
|
|
@ -16,9 +16,7 @@ use Symfony\Component\Security\Core\User\User;
|
|||||||
use Symfony\Component\Security\Core\User\UserInterface;
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||||
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
|
use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface;
|
||||||
use Symfony\Component\Security\Http\Authenticator\Passport\AnonymousPassport;
|
|
||||||
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
|
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
|
||||||
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
|
|
||||||
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;
|
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;
|
||||||
use Symfony\Component\Security\Http\Event\CheckPassportEvent;
|
use Symfony\Component\Security\Http\Event\CheckPassportEvent;
|
||||||
use Symfony\Component\Security\Http\EventListener\UserProviderListener;
|
use Symfony\Component\Security\Http\EventListener\UserProviderListener;
|
||||||
@ -61,7 +59,6 @@ class UserProviderListenerTest extends TestCase
|
|||||||
|
|
||||||
public function provideCompletePassports()
|
public function provideCompletePassports()
|
||||||
{
|
{
|
||||||
yield [new AnonymousPassport()];
|
|
||||||
yield [new SelfValidatingPassport(new UserBadge('wouter', function () {}))];
|
yield [new SelfValidatingPassport(new UserBadge('wouter', function () {}))];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user