File manager - Edit - /home/opticamezl/www/newok/MultiFactor.tar
Back
Captive.php 0000644 00000004253 15172774510 0006665 0 ustar 00 <?php /** * Joomla! Content Management System * * @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\CMS\Event\MultiFactor; use Joomla\CMS\Event\AbstractImmutableEvent; use Joomla\CMS\Event\Result\ResultAware; use Joomla\CMS\Event\Result\ResultAwareInterface; use Joomla\CMS\Event\Result\ResultTypeObjectAware; use Joomla\Component\Users\Administrator\DataShape\CaptiveRenderOptions; use Joomla\Component\Users\Administrator\Table\MfaTable; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Concrete Event class for the onUserMultifactorCaptive event * * @since 4.2.0 */ class Captive extends AbstractImmutableEvent implements ResultAwareInterface { use ResultAware; use ResultTypeObjectAware; /** * Public constructor * * @param MfaTable $record The MFA record to use in the captive login page * * @since 4.2.0 */ public function __construct(MfaTable $record) { parent::__construct('onUserMultifactorCaptive', ['record' => $record]); $this->resultIsNullable = true; $this->resultAcceptableClasses = [ CaptiveRenderOptions::class, ]; } /** * Validate the value of the 'record' named parameter * * @param MfaTable $value The value to validate * * @return MfaTable * @since 4.2.0 * * @deprecated 4.4.0 will be removed in 6.0 * Use counterpart with onSet prefix */ public function setRecord(MfaTable $value): MfaTable { if (empty($value)) { throw new \DomainException(sprintf('Argument \'record\' of event %s must be a MfaTable object.', $this->name)); } return $value; } /** * Validate the value of the 'record' named parameter * * @param MfaTable $value The value to validate * * @return MfaTable * @since 4.4.0 */ protected function onSetRecord(MfaTable $value): MfaTable { return $this->setRecord($value); } } NotifyActionLog.php 0000644 00000003674 15172774510 0010350 0 ustar 00 <?php /** * Joomla! Content Management System * * @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\CMS\Event\MultiFactor; use Joomla\CMS\Event\AbstractImmutableEvent; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Concrete event class for the custom events used to notify the User Action Log plugin about Two * Factor Authentication actions. * * @since 4.2.0 */ class NotifyActionLog extends AbstractImmutableEvent { private const ACCEPTABLE_EVENTS = [ 'onComUsersCaptiveValidateSuccess', 'onComUsersViewMethodsAfterDisplay', 'onComUsersCaptiveShowCaptive', 'onComUsersCaptiveShowSelect', 'onComUsersCaptiveValidateFailed', 'onComUsersCaptiveValidateInvalidMethod', 'onComUsersCaptiveValidateTryLimitReached', 'onComUsersCaptiveValidateSuccess', 'onComUsersControllerMethodAfterRegenerateBackupCodes', 'onComUsersControllerMethodBeforeAdd', 'onComUsersControllerMethodBeforeDelete', 'onComUsersControllerMethodBeforeEdit', 'onComUsersControllerMethodBeforeSave', 'onComUsersControllerMethodsBeforeDisable', 'onComUsersControllerMethodsBeforeDoNotShowThisAgain', ]; /** * Public constructor * * @param string $name Event name. Must belong in self::ACCEPTABLE_EVENTS * @param array $arguments Event arguments (different for each event). * * @since 4.2.0 */ public function __construct(string $name, array $arguments = []) { if (!in_array($name, self::ACCEPTABLE_EVENTS)) { throw new \InvalidArgumentException(sprintf('The %s event class does not support the %s event name.', __CLASS__, $name)); } parent::__construct($name, $arguments); } } GetMethod.php 0000644 00000002217 15172774510 0007150 0 ustar 00 <?php /** * Joomla! Content Management System * * @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\CMS\Event\MultiFactor; use Joomla\CMS\Event\AbstractImmutableEvent; use Joomla\CMS\Event\Result\ResultAware; use Joomla\CMS\Event\Result\ResultAwareInterface; use Joomla\CMS\Event\Result\ResultTypeObjectAware; use Joomla\Component\Users\Administrator\DataShape\MethodDescriptor; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Concrete Event class for the onUserMultifactorGetMethod event * * @since 4.2.0 */ class GetMethod extends AbstractImmutableEvent implements ResultAwareInterface { use ResultAware; use ResultTypeObjectAware; /** * Public constructor * * @since 4.2.0 */ public function __construct() { parent::__construct('onUserMultifactorGetMethod', []); $this->resultIsNullable = true; $this->resultAcceptableClasses = [ MethodDescriptor::class, ]; } } SaveSetup.php 0000644 00000005767 15172774510 0007224 0 ustar 00 <?php /** * Joomla! Content Management System * * @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\CMS\Event\MultiFactor; use Joomla\CMS\Event\AbstractImmutableEvent; use Joomla\CMS\Event\Result\ResultAware; use Joomla\CMS\Event\Result\ResultAwareInterface; use Joomla\CMS\Event\Result\ResultTypeArrayAware; use Joomla\Component\Users\Administrator\Table\MfaTable; use Joomla\Input\Input; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Concrete Event class for the onUserMultifactorSaveSetup event * * @since 4.2.0 */ class SaveSetup extends AbstractImmutableEvent implements ResultAwareInterface { use ResultAware; use ResultTypeArrayAware; /** * Public constructor * * @param MfaTable $record The record to save into * @param Input $input The application input object * * @since 4.2.0 */ public function __construct(MfaTable $record, Input $input) { parent::__construct( 'onUserMultifactorSaveSetup', [ 'record' => $record, 'input' => $input, ] ); $this->resultIsNullable = true; } /** * Validate the value of the 'record' named parameter * * @param MfaTable $value The value to validate * * @return MfaTable * @since 4.2.0 * * @deprecated 4.4.0 will be removed in 6.0 * Use counterpart with onSet prefix */ public function setRecord(MfaTable $value): MfaTable { if (empty($value)) { throw new \DomainException(sprintf('Argument \'record\' of event %s must be a MfaTable object.', $this->name)); } return $value; } /** * Validate the value of the 'record' named parameter * * @param Input $value The value to validate * * @return Input * @since 4.2.0 * * @deprecated 4.4.0 will be removed in 6.0 * Use counterpart with onSet prefix */ public function setInput(Input $value): Input { if (empty($value)) { throw new \DomainException(sprintf('Argument \'input\' of event %s must be an Input object.', $this->name)); } return $value; } /** * Validate the value of the 'record' named parameter * * @param MfaTable $value The value to validate * * @return MfaTable * @since 4.4.0 */ protected function onSetRecord(MfaTable $value): MfaTable { return $this->setRecord($value); } /** * Validate the value of the 'record' named parameter * * @param Input $value The value to validate * * @return Input * @since 4.4.0 */ protected function onSetInput(Input $value): Input { return $this->setInput($value); } } Callback.php 0000644 00000003323 15172774510 0006763 0 ustar 00 <?php /** * Joomla! Content Management System * * @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\CMS\Event\MultiFactor; use Joomla\CMS\Event\AbstractImmutableEvent; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Concrete Event class for the onUserMultifactorCallback event * * @since 4.2.0 */ class Callback extends AbstractImmutableEvent { /** * Public constructor * * @param string $method The MFA method name * * @since 4.2.0 */ public function __construct(string $method) { parent::__construct('onUserMultifactorCallback', ['method' => $method]); } /** * Validate the value of the 'method' named parameter * * @param string|null $value The value to validate * * @return string * @throws \DomainException * @since 4.2.0 * * @deprecated 4.4.0 will be removed in 6.0 * Use counterpart with onSet prefix */ public function setMethod(string $value): string { if (empty($value)) { throw new \DomainException(sprintf("Argument 'method' of event %s must be a non-empty string.", $this->name)); } return $value; } /** * Validate the value of the 'method' named parameter * * @param string|null $value The value to validate * * @return string * @throws \DomainException * @since 4.4.0 */ protected function onSetMethod(string $value): string { return $this->setMethod($value); } } Validate.php 0000644 00000007613 15172774510 0007026 0 ustar 00 <?php /** * Joomla! Content Management System * * @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\CMS\Event\MultiFactor; use Joomla\CMS\Event\AbstractImmutableEvent; use Joomla\CMS\Event\Result\ResultAware; use Joomla\CMS\Event\Result\ResultAwareInterface; use Joomla\CMS\Event\Result\ResultTypeBooleanAware; use Joomla\CMS\User\User; use Joomla\Component\Users\Administrator\Table\MfaTable; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Concrete Event class for the onUserMultifactorValidate event * * @since 4.2.0 */ class Validate extends AbstractImmutableEvent implements ResultAwareInterface { use ResultAware; use ResultTypeBooleanAware; /** * Public constructor * * @param MfaTable $record The MFA record to validate against * @param User $user The user currently logged into the site * @param string $code The MFA code we are validating * * @since 4.2.0 */ public function __construct(MfaTable $record, User $user, string $code) { parent::__construct( 'onUserMultifactorValidate', [ 'record' => $record, 'user' => $user, 'code' => $code, ] ); } /** * Validate the value of the 'record' named parameter * * @param MfaTable $value The value to validate * * @return MfaTable * @since 4.2.0 * * @deprecated 4.4.0 will be removed in 6.0 * Use counterpart with onSet prefix */ public function setRecord(MfaTable $value): MfaTable { if (empty($value)) { throw new \DomainException(sprintf('Argument \'record\' of event %s must be a MfaTable object.', $this->name)); } return $value; } /** * Validate the value of the 'user' named parameter * * @param User $value The value to validate * * @return User * @since 4.2.0 * * @deprecated 4.4.0 will be removed in 6.0 * Use counterpart with onSet prefix */ public function setUser(User $value): User { if (empty($value) || ($value->id <= 0) || ($value->guest == 1)) { throw new \DomainException(sprintf('Argument \'user\' of event %s must be a non-guest User object.', $this->name)); } return $value; } /** * Validate the value of the 'code' named parameter * * @param string|null $value The value to validate * * @return string|null * @since 4.2.0 * * @deprecated 4.4.0 will be removed in 6.0 * Use counterpart with onSet prefix */ public function setCode(?string $value): ?string { // No validation necessary, the type check in the method options is enough return $value; } /** * Validate the value of the 'record' named parameter * * @param MfaTable $value The value to validate * * @return MfaTable * @since 4.4.0 */ protected function onSetRecord(MfaTable $value): MfaTable { return $this->setRecord($value); } /** * Validate the value of the 'user' named parameter * * @param User $value The value to validate * * @return User * @since 4.4.0 */ protected function onSetUser(User $value): User { return $this->setUser($value); } /** * Validate the value of the 'code' named parameter * * @param string|null $value The value to validate * * @return string|null * @since 4.4.0 */ protected function onSetCode(?string $value): ?string { return $this->setCode($value); } } GetSetup.php 0000644 00000004243 15172774510 0007031 0 ustar 00 <?php /** * Joomla! Content Management System * * @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\CMS\Event\MultiFactor; use Joomla\CMS\Event\AbstractImmutableEvent; use Joomla\CMS\Event\Result\ResultAware; use Joomla\CMS\Event\Result\ResultAwareInterface; use Joomla\CMS\Event\Result\ResultTypeObjectAware; use Joomla\Component\Users\Administrator\DataShape\SetupRenderOptions; use Joomla\Component\Users\Administrator\Table\MfaTable; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Concrete Event class for the onUserMultifactorGetSetup event * * @since 4.2.0 */ class GetSetup extends AbstractImmutableEvent implements ResultAwareInterface { use ResultAware; use ResultTypeObjectAware; /** * Public constructor * * @param MfaTable $record The record to display the setup page for * * @since 4.2.0 */ public function __construct(MfaTable $record) { parent::__construct('onUserMultifactorGetSetup', ['record' => $record]); $this->resultIsNullable = true; $this->resultAcceptableClasses = [ SetupRenderOptions::class, ]; } /** * Validate the value of the 'record' named parameter * * @param MfaTable $value The value to validate * * @return MfaTable * @since 4.2.0 * * @deprecated 4.4.0 will be removed in 6.0 * Use counterpart with onSet prefix */ public function setRecord(MfaTable $value): MfaTable { if (empty($value)) { throw new \DomainException(sprintf('Argument \'record\' of event %s must be a MfaTable object.', $this->name)); } return $value; } /** * Validate the value of the 'record' named parameter * * @param MfaTable $value The value to validate * * @return MfaTable * @since 4.4.0 */ protected function onSetRecord(MfaTable $value): MfaTable { return $this->setRecord($value); } } BeforeDisplayMethods.php 0000644 00000003450 15172774510 0011344 0 ustar 00 <?php /** * Joomla! Content Management System * * @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\CMS\Event\MultiFactor; use Joomla\CMS\Event\AbstractImmutableEvent; use Joomla\CMS\Event\Result\ResultAware; use Joomla\CMS\User\User; // phpcs:disable PSR1.Files.SideEffects \defined('JPATH_PLATFORM') or die; // phpcs:enable PSR1.Files.SideEffects /** * Concrete Event class for the onUserMultifactorBeforeDisplayMethods event * * @since 4.2.0 */ class BeforeDisplayMethods extends AbstractImmutableEvent { use ResultAware; /** * Public constructor * * @param User $user The user the MFA methods are displayed for * * @since 4.2.0 */ public function __construct(User $user) { parent::__construct('onUserMultifactorBeforeDisplayMethods', ['user' => $user]); } /** * Validate the value of the 'user' named parameter * * @param User $value The value to validate * * @return User * @since 4.2.0 * * @deprecated 4.4.0 will be removed in 6.0 * Use counterpart with onSet prefix */ public function setUser(User $value): User { if (empty($value) || ($value->id <= 0) || ($value->guest == 1)) { throw new \DomainException(sprintf('Argument \'user\' of event %s must be a non-guest User object.', $this->name)); } return $value; } /** * Validate the value of the 'user' named parameter * * @param User $value The value to validate * * @return User * @since 4.4.0 */ protected function onSetUser(User $value): User { return $this->setUser($value); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings