!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/php55/usr/share/pear/Symfony/Component/Security/Core/Authentication/Provider/   drwxr-xr-x
Free 293.75 GB of 429.69 GB (68.36%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     UserAuthenticationProvider.php (5.12 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Security\Core\Authentication\Provider;

use 
Symfony\Component\Security\Core\User\UserInterface;
use 
Symfony\Component\Security\Core\User\UserCheckerInterface;
use 
Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use 
Symfony\Component\Security\Core\Exception\AuthenticationException;
use 
Symfony\Component\Security\Core\Exception\BadCredentialsException;
use 
Symfony\Component\Security\Core\Exception\AuthenticationServiceException;
use 
Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
use 
Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use 
Symfony\Component\Security\Core\Role\SwitchUserRole;

/**
 * UserProviderInterface retrieves users for UsernamePasswordToken tokens.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
abstract class UserAuthenticationProvider implements AuthenticationProviderInterface
{
    private 
$hideUserNotFoundExceptions;
    private 
$userChecker;
    private 
$providerKey;

    
/**
     * Constructor.
     *
     * @param UserCheckerInterface $userChecker                An UserCheckerInterface interface
     * @param string               $providerKey                A provider key
     * @param Boolean              $hideUserNotFoundExceptions Whether to hide user not found exception or not
     *
     * @throws \InvalidArgumentException
     */
    
public function __construct(UserCheckerInterface $userChecker$providerKey$hideUserNotFoundExceptions true)
    {
        if (empty(
$providerKey)) {
            throw new \
InvalidArgumentException('$providerKey must not be empty.');
        }

        
$this->userChecker $userChecker;
        
$this->providerKey $providerKey;
        
$this->hideUserNotFoundExceptions $hideUserNotFoundExceptions;
    }

    
/**
     * {@inheritdoc}
     */
    
public function authenticate(TokenInterface $token)
    {
        if (!
$this->supports($token)) {
            return 
null;
        }

        
$username $token->getUsername();
        if (empty(
$username)) {
            
$username 'NONE_PROVIDED';
        }

        try {
            
$user $this->retrieveUser($username$token);
        } catch (
UsernameNotFoundException $notFound) {
            if (
$this->hideUserNotFoundExceptions) {
                throw new 
BadCredentialsException('Bad credentials'0$notFound);
            }
            
$notFound->setUsername($username);

            throw 
$notFound;
        }

        if (!
$user instanceof UserInterface) {
            throw new 
AuthenticationServiceException('retrieveUser() must return a UserInterface.');
        }

        try {
            
$this->userChecker->checkPreAuth($user);
            
$this->checkAuthentication($user$token);
            
$this->userChecker->checkPostAuth($user);
        } catch (
BadCredentialsException $e) {
            if (
$this->hideUserNotFoundExceptions) {
                throw new 
BadCredentialsException('Bad credentials'0$e);
            }

            throw 
$e;
        }

        
$authenticatedToken = new UsernamePasswordToken($user$token->getCredentials(), $this->providerKey$this->getRoles($user$token));
        
$authenticatedToken->setAttributes($token->getAttributes());

        return 
$authenticatedToken;
    }

    
/**
     * {@inheritdoc}
     */
    
public function supports(TokenInterface $token)
    {
        return 
$token instanceof UsernamePasswordToken && $this->providerKey === $token->getProviderKey();
    }

    
/**
     * Retrieves roles from user and appends SwitchUserRole if original token contained one.
     *
     * @param UserInterface  $user  The user
     * @param TokenInterface $token The token
     *
     * @return Role[] The user roles
     */
    
private function getRoles(UserInterface $userTokenInterface $token)
    {
        
$roles $user->getRoles();

        foreach (
$token->getRoles() as $role) {
            if (
$role instanceof SwitchUserRole) {
                
$roles[] = $role;

                break;
            }
        }

        return 
$roles;
    }

    
/**
     * Retrieves the user from an implementation-specific location.
     *
     * @param string                $username The username to retrieve
     * @param UsernamePasswordToken $token    The Token
     *
     * @return UserInterface The user
     *
     * @throws AuthenticationException if the credentials could not be validated
     */
    
abstract protected function retrieveUser($usernameUsernamePasswordToken $token);

    
/**
     * Does additional checks on the user and token (like validating the
     * credentials).
     *
     * @param UserInterface         $user  The retrieved UserInterface instance
     * @param UsernamePasswordToken $token The UsernamePasswordToken token to be authenticated
     *
     * @throws AuthenticationException if the credentials could not be validated
     */
    
abstract protected function checkAuthentication(UserInterface $userUsernamePasswordToken $token);
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0967 ]--