public static function getFirewallWithAccessListenerNames(Container $container)
    {
        $names = [];

        foreach (self::getFirewallNames($container) as $firewallName) {
            /** @var FirewallContext $firewall */
            $firewall = $container->get(sprintf('security.firewall.map.context.%s', $firewallName));

            if (0 === count($firewall->getContext())) {
                continue;
            }

            $firewallContext = $firewall->getContext();
            if (false === isset($firewallContext[0]) || 0 === count($firewallContext[0])) {
                continue;
            }

            foreach ($firewallContext[0] as $listener) {
                if ($listener instanceof AccessListener) {
                    $names[] = $firewallName;
                }
            }
        }

        return $names;
    }