![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/module-two-factor-auth/Command/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\TwoFactorAuth\Command; use Magento\TwoFactorAuth\Api\ProviderPoolInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; /** * 2FA providers list command */ class TfaProviders extends Command { /** * @var ProviderPoolInterface */ private $providerPool; /** * @param ProviderPoolInterface $providerPool */ public function __construct( ProviderPoolInterface $providerPool ) { parent::__construct(); $this->providerPool = $providerPool; } /** * @inheritDoc */ protected function configure() { $this->setName('security:tfa:providers'); $this->setDescription('List all available providers'); parent::configure(); } /** * @inheritDoc * * @SuppressWarnings("PHPMD.UnusedFormalParameter") */ protected function execute(InputInterface $input, OutputInterface $output) { $providers = $this->providerPool->getProviders(); foreach ($providers as $provider) { $output->writeln(sprintf("%16s: %s", $provider->getCode(), $provider->getName())); } return 0; } }