CoreFiles by mySites.guru
provider.php42 lines, 1,072 bytes, from Joomla_4.2.0-beta1-Beta-Full_Package.zip
Raw History Compare with 4.1.0-beta3
md5
3e39692ffd7fe07432dcc435ddd260da
sha1
d6f505685b48527f40e6d84f3de745baeb8c5915
sha256
7097626c638824097165f5850d58d1b6aceb80889667f7634c6a1e70f17beec1
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Multifactorauth.webauthn
 *
 * @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\Webauthn\Extension\Webauthn;

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', 'webauthn');
				$subject = $container->get(DispatcherInterface::class);

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

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