__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* @package Joomla.Plugin
* @subpackage System.Webauthn
*
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Plugin\System\Webauthn\PluginTraits;
use Joomla\CMS\Event\Plugin\System\Webauthn\AjaxInitCreate;
use Joomla\CMS\Factory;
use Joomla\CMS\User\User;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects
/**
* Ajax handler for akaction=initcreate
*
* Returns the Public Key Creation Options to start the attestation ceremony on the browser.
*
* @since 4.2.0
*/
trait AjaxHandlerInitCreate
{
/**
* Returns the Public Key Creation Options to start the attestation ceremony on the browser.
*
* @param AjaxInitCreate $event The event we are handling
*
* @return void
* @throws \Exception
* @since 4.2.0
*/
public function onAjaxWebauthnInitcreate(AjaxInitCreate $event): void
{
// Load plugin language files
$this->loadLanguage();
// Make sure I have a valid user
$user = Factory::getApplication()->getIdentity();
if (!($user instanceof User) || $user->guest) {
$event->addResult(new \stdClass());
return;
}
// I need the server to have either GMP or BCComp support to attest new authenticators
if (\function_exists('gmp_intval') === false && \function_exists('bccomp') === false) {
$event->addResult(new \stdClass());
return;
}
$session = $this->getApplication()->getSession();
$session->set('plg_system_webauthn.registration_user_id', $user->id);
$event->addResult($this->authenticationHelper->getPubKeyCreationOptions($user));
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| AdditionalLoginButtons.php | File | 6.23 KB | 0664 |
|
| AjaxHandler.php | File | 6.88 KB | 0664 |
|
| AjaxHandlerChallenge.php | File | 2.92 KB | 0664 |
|
| AjaxHandlerCreate.php | File | 4.72 KB | 0664 |
|
| AjaxHandlerDelete.php | File | 2.25 KB | 0664 |
|
| AjaxHandlerInitCreate.php | File | 1.81 KB | 0664 |
|
| AjaxHandlerLogin.php | File | 12.52 KB | 0664 |
|
| AjaxHandlerSaveLabel.php | File | 2.51 KB | 0664 |
|
| EventReturnAware.php | File | 1.23 KB | 0664 |
|
| UserDeletion.php | File | 2.13 KB | 0664 |
|
| UserProfileFields.php | File | 7.26 KB | 0664 |
|