/**
* Constructor
*
* @param string $pluginType The plugin type to run authorisation and authentication on
* @param DispatcherInterface $dispatcher The event dispatcher we're going to use
*
* @since 1.7.0
*/
public function __construct(string $pluginType = 'authentication', DispatcherInterface $dispatcher = null)
{
// Set the dispatcher
if (!\is_object($dispatcher)) {
$dispatcher = Factory::getContainer()->get('dispatcher');
}
$this->setDispatcher($dispatcher);
$this->pluginType = $pluginType;
$isLoaded = PluginHelper::importPlugin($this->pluginType);
if (!$isLoaded) {
Log::add(Text::_('JLIB_USER_ERROR_AUTHENTICATION_LIBRARIES'), Log::WARNING, 'jerror');
}
}