Create new user model instance

@param string $username
@param string $password
@param array  $options

@return \ViKon\Auth\Model\User
340230
protected function newUserModel($username, $password, array $options = [])
    {
        $user           = new User();
        $user->username = $username;
        $user->password = $password;

        foreach ($options as $key => $value) {
            $user->{$key} = $value;
        }

        return $user;
    }
1035104
public function create($userId, $name, $redirect, $personalAccess = false, $password = false)
    {
        $client = (new Client)->forceFill([
            'user_id' => $userId,
            'name' => $name,
            'secret' => str_random(40),
            'redirect' => $redirect,
            'personal_access_client' => $personalAccess,
            'password_client' => $password,
            'revoked' => false,
        ]);

        $client->save();

        return $client;
    }
1041525
public function login($username = 'anonymous', $password = '')
    {
        $result = $this->ftp->login($username, $password);

        if ($result === false) {
            throw new FtpException('Login incorrect');
        }

        return $this;
    }
976103
public function create($body, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'Body' => $body,
            'From' => $options['from'],
            'Attributes' => $options['attributes'],
        ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new MessageInstance(
            $this->version,
            $payload,
            $this->solution['serviceSid'],
            $this->solution['channelSid']
        );
    }
653324
public static function add($name, array $options) 
		{

			// Already known?
			if (array_key_exists($name, self::$_auths)) {
				throw new \Exception("There is already a Auth defined for '$name'.", 1);				
			}

			// Create it
			$auth = new Auth($name, $options);
			self::$_auths[$name] = $auth;
			return $auth;

		}
481138
public function createUserMenu(array $options)
    {
        $menu = $this->factory->createItem('root');
        $menu->setLabel($this->token_storage->getToken()->getUser()->__toString());

        $event = new UserMenuCollectionEvent($menu);
        $this->dispatcher->dispatch(UserMenuCollectionEvent::NAME, $event);

        return $menu;
    }
934189
public function login($username, $password)
    {
        $args = array($username, $password);
        $token = $this->_soapAdapter->call('login', $args);
        $this->setToken($token);
        return $token;
    }
608526
public static function createFromDsn($dsn, $username, $password)
    {
        try {
            $pdo = new \PDO($dsn, $username, $password);

            return new self($pdo);
        } catch (\Exception $exception) {
            return;
        }
    }
646941
public function make($data, array $options = array()) {
        if(is_string($data)) {
            if (config('trinitycore-auth.passport'))
                return md5($data);
            else
                throw new \InvalidArgumentException("Cannot create password hash for TrinityCore with only one argument.");
        }
        if(is_array($data))
        {
            // cast $user Array to Object, no need to instantiate a Collection here.
            $data = (object)$data;
        }

        return SHA1(strtoupper($data->username.':'.$data->password));
    }
291707
public function createUser($username, $password, $privilege = null)
    {
        $query = sprintf('CREATE USER %s WITH PASSWORD \'%s\'', $username, $password);

        if ($privilege) {
            $query .= " WITH $privilege PRIVILEGES";
        }

        return $this->client->query(null, $query);
    }
694869
public function basicAuth($username, $password)
    {
        $this->auth = new BasicAuth($username, $password);
        return $this->auth;
    }
678509
public function createLoginForm($options = array())
		{

			// Default options
			$options = array_merge(array(
				"action" => $this->loginUri,
				"method" => "post"
			), $options);

			// Create it!
			$form = new Form($options);

			// Done.
			return $form;

		}
1005523
public function acquireTokenForUser($username, $password)
    {
        $this->provider = new SamlTokenProvider($this->authorityUrl);
        $parameters = array(
            'username' => $username,
            'password' => $password
        );
        $this->provider->acquireToken($parameters);
    }
736494
private function createUser($username, $password)
    {
        $user = new UserInformation(
            [
                'username' => $username,
                'acl'      => UserInformationInterface::ROLE_ALL
            ]
        );

        $user->set('password', $this->get('security.password_encoder')->encodePassword($user, $password));

        $user = $this->get('tenside.user_provider')->addUser($user)->refreshUser($user);

        return $user;
    }
907506
public function setAuthentication($username, $password)
    {
        $this->_mailer->Username = $username;
        $this->_mailer->Password = $password;

        return $this;
    }
933669
public function setHttpAuth(string $username, string $password = ''): AbstractApi
    {
        $this->httpAuth['username'] = $username;
        $this->httpAuth['password'] = $password;

        return $this;
    }
526529
public function withCredentials($username, $password)
	{
		$this->cookie = null;
		$this->credentials = array('username' => $username, 'password' => $password);
		return $this;
	}