|
13 | 13 |
|
14 | 14 | use Psr\Container\ContainerInterface; |
15 | 15 | use Symfony\Bundle\SecurityBundle\Security\FirewallConfig; |
16 | | -use Symfony\Component\DependencyInjection\ServiceLocator; |
17 | 16 | use Symfony\Component\HttpFoundation\Request; |
18 | | -use Symfony\Component\HttpFoundation\RequestStack; |
19 | 17 | use Symfony\Component\HttpFoundation\Response; |
20 | 18 | use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; |
21 | 19 | use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; |
22 | 20 | use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; |
23 | 21 | use Symfony\Component\Security\Core\Authorization\UserAuthorizationCheckerInterface; |
24 | 22 | use Symfony\Component\Security\Core\Exception\LogicException; |
25 | 23 | use Symfony\Component\Security\Core\Exception\LogoutException; |
26 | | -use Symfony\Component\Security\Core\User\UserCheckerInterface; |
27 | 24 | use Symfony\Component\Security\Core\User\UserInterface; |
28 | 25 | use Symfony\Component\Security\Csrf\CsrfToken; |
29 | | -use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; |
30 | 26 | use Symfony\Component\Security\Http\Authenticator\AuthenticatorInterface; |
31 | 27 | use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface; |
32 | 28 | use Symfony\Component\Security\Http\Event\LogoutEvent; |
33 | | -use Symfony\Component\Security\Http\FirewallMapInterface; |
34 | 29 | use Symfony\Component\Security\Http\ParameterBagUtils; |
35 | 30 | use Symfony\Contracts\Service\ServiceProviderInterface; |
36 | | -use Symfony\Contracts\Service\ServiceSubscriberInterface; |
37 | 31 |
|
38 | 32 | /** |
39 | 33 | * Helper class for commonly-needed security tasks. |
|
44 | 38 | * |
45 | 39 | * @final |
46 | 40 | */ |
47 | | -class Security implements AuthorizationCheckerInterface, ServiceSubscriberInterface, UserAuthorizationCheckerInterface |
| 41 | +class Security implements AuthorizationCheckerInterface, UserAuthorizationCheckerInterface |
48 | 42 | { |
49 | 43 | public function __construct( |
50 | 44 | private readonly ContainerInterface $container, |
@@ -200,19 +194,4 @@ private function getAuthenticator(?string $authenticatorName, string $firewallNa |
200 | 194 |
|
201 | 195 | return $firewallAuthenticatorLocator->get($authenticatorId); |
202 | 196 | } |
203 | | - |
204 | | - public static function getSubscribedServices(): array |
205 | | - { |
206 | | - return [ |
207 | | - 'security.token_storage' => TokenStorageInterface::class, |
208 | | - 'security.authorization_checker' => AuthorizationCheckerInterface::class, |
209 | | - 'security.user_authorization_checker' => UserAuthorizationCheckerInterface::class, |
210 | | - 'security.authenticator.managers_locator' => '?'.ServiceProviderInterface::class, |
211 | | - 'request_stack' => RequestStack::class, |
212 | | - 'security.firewall.map' => FirewallMapInterface::class, |
213 | | - 'security.user_checker' => UserCheckerInterface::class, |
214 | | - 'security.firewall.event_dispatcher_locator' => ServiceLocator::class, |
215 | | - 'security.csrf.token_manager' => '?'.CsrfTokenManagerInterface::class, |
216 | | - ]; |
217 | | - } |
218 | 197 | } |
0 commit comments