public function verify(string $username = null, string $password = null, string $user = null)
    {
        if ($username && $password) {
            $users = $this->getUsers($user);

            foreach ($users as $user => $credentials) {
                if (
                    password_verify($username, reset($credentials)) &&
                    password_verify($password, end($credentials))
                ) {
                    $this->currentUser = $user;

                    return;
                }
            }
        }

        throw new UnauthorizedHttpException('Basic');
    }
public function verify(string $username = null, string $password = null, string $user = null)
    {
        if ($username && $password) {
            $users = $this->getUsers($user);

            foreach ($users as $user => $credentials) {
                if (
                    password_verify($username, reset($credentials)) &&
                    password_verify($password, end($credentials))
                ) {
                    $this->currentUser = $user;

                    return;
                }
            }
        }

        throw new UnauthorizedHttpException('Basic');
    }
public function verify ( string $ username = null , string $ password = null , string $ user = null ) { if ( $ username && $ password ) { $ users = $ this -> getUsers ( $ user ) ; foreach ( $ users as $ user => $ credentials ) { if ( password_verify ( $ username , reset ( $ credentials ) ) && password_verify ( $ password , end ( $ credentials ) ) ) { $ this -> currentUser = $ user ; return ; } } } throw new UnauthorizedHttpException ( 'Basic' ) ; }
Verify the user input.

@param string|null $username
@param string|null $password
@param string|null $user

@throws \Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException

@return null
Verify the user input .