CoreFiles by mySites.guru
provider.php42 lines, 1,067 bytes, from Joomla_4.2.0-beta1-Beta-Full_Package.zip
Raw History Compare with 4.1.0-beta3
md5
d12eb876334dfd6867e9af7362a5125a
sha1
81287a782172acee651415386ddbdf6f8e4d5df4
sha256
5037a363f3d1a60f11b432e5434ebf81240c889c50c4f79636f9f2efd44de678
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Multifactorauth.yubikey
 *
 * @copyright   (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') || die;

use Joomla\CMS\Extension\PluginInterface;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Multifactorauth\Yubikey\Extension\Yubikey;

return new class implements ServiceProviderInterface
{
	/**
	 * Registers the service provider with a DI container.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  void
	 *
	 * @since 4.2.0
	 */
	public function register(Container $container)
	{
		$container->set(
			PluginInterface::class,
			function (Container $container) {
				$config  = (array) PluginHelper::getPlugin('multifactorauth', 'yubikey');
				$subject = $container->get(DispatcherInterface::class);

				return new Yubikey($subject, $config);
			}
		);
	}
};

No other release has this exact content. See every version of this file.