Fire the bound event.

@param string $username
@param string $password

@return void
774999
protected function fireBoundEvent($username, $password)
    {
        if (isset($this->events)) {
            $this->events->fire(new Bound($this->connection, $username, $password));
        }
    }
909076
public function execute($password, $subject)
    {
        foreach ($this->_conditions as $condition) {
            if ($condition->evaluate($password) === false) {
                // Trigger all actions if any condition is unmet
                foreach ($this->_actions as $action) {
                    $action->execute($password, $subject);
                }
            }
        }
    }
464767
protected function authenticate($username,$password) {

            if (is_callable($this->onAuthenticate)) {
                call_user_func($this->onAuthenticate,$username,$password);
            }

        }
565307
protected function fireFailedEvent($user, array $credentials)
    {
        if (isset($this->events)) {
            $this->events->dispatch(new Events\Failed(
                $this->name, $user, $credentials
            ));
        }
    }
212253
protected function fireLoginEvent($user, $remember = false)
    {
        if (isset($this->events)) {
            $this->events->dispatch(new Events\Login(
                $this->name, $user, $remember
            ));
        }
    }
287243
public function sendNewUser(string $email, string $username, string $password): void
	{
		$mail = $this->createMail('newUser');

		$mail->link = $this->link('Cms:Sign:in');
		$mail->username = $username;
		$mail->password = $password;

		$mail->setSubject('cms.mailing.newUser.subject')
			->addTo($email);

		$mail->send();
	}
458592
public function bind($name = null, $password = null)
    {
        if (strlen(trim($name)) > 0) {
            $password = (null === $password)?'':$password;
            $this->connection->bind($name, $password);
            $this->isBound = true;
            return;
        }

        if ($this->configuration['bind_anonymous']) {
            $this->connection->bind();
            $this->isBound = true;
            return;
        }

        $this->connection->bind(
            $this->configuration['bind_dn'],
            $this->configuration['bind_password']
        );
        $this->isBound = true;
    }
624042
private function bindUsingCredentials($username, $password)
    {
        // Allow binding with null credentials
        if (empty($username)) {
            $username = null;
        } else {
            $username .= $this->getAccountSuffix();
        }

        if (empty($password)) {
            $password = null;
        }

        $this->ldapConnection->bind($username, $password);

        if (!$this->ldapConnection->isBound()) {
            $error = $this->ldapConnection->getLastError();

            if ($this->ldapConnection->isUsingSSL() && !$this->ldapConnection->isUsingTLS()) {
                $message = 'Bind to Active Directory failed. Either the LDAPs connection failed or the login credentials are incorrect. AD said: '.$error;
            } else {
                $message = 'Bind to Active Directory failed. Check the login credentials and/or server details. AD said: '.$error;
            }

            throw new AdldapException($message);
        }

        return true;
    }
1194055
public function bind($username = null, $password = null, $nosub = 0)
	{
		if (!$this->isConnected())
		{
			if (!$this->connect())
			{
				return false;
			}
		}

		if ($username === null)
		{
			$username = $this->username;
		}

		if ($password === null)
		{
			$password = $this->password;
		}

		$this->setDn($username, $nosub);

		$this->isBound = ldap_bind($this->resource, $this->getDn(), $password);

		return $this->isBound;
	}
271542
protected function fireLoginEvent($user, $remember = false)
    {
        if (isset($this->events)) {
            $this->events->fire('auth.login', [$user, $remember]);
        }
    }
810820
public function fireEvent(string $event): void
    {
        $this->log->debug('Event {event} has been fired.', ['event' => $event]);
        foreach ($this->event_handlers as $handler) {
            /** @var EventHandler $handler */
            if ($event === $handler->getEvent()) {
                $handler->execute();
            }
        }
    }
540169
public function setCredentials($username, $password)
    {
        $this->setCurlOption(CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
        $this->setCurlOption(CURLOPT_USERPWD, $username . ":" . $password);
    }
228898
public function setAuth($username, $password)
    {
        if (!empty($username) && !empty($password)) {
            $this->username = stripslashes(trim($username));
            $this->password = stripslashes(trim($password));
        }
    }
742296
public function login(?string $username, ?string $password)
    {
        try {
            $this->startBrokerSession();

            if (!$username || !$password) {
                $this->fail('No username and/or password provided.');
            }

            if (!$this->authenticate($username, $password)) {
                $this->fail('User authentication failed.');
            }
        } catch (SSOServerException $e) {
            return $this->returnJson(['error' => $e->getMessage()]);
        }

        $this->setSessionData('sso_user', $username);

        return $this->userInfo();
    }
490229
protected function authenticate(string $username, string $password)
    {
        if (!isset($this->users[$username]) || $this->users[$username]['password'] != $password) {
            return false;
        }

        return true;
    }
368561
public function process($username, $password, $email)
    {
        $dm = $this->documentManager;

        /* @var UserRepository $repo */
        $repo = $dm->getRepository(User::class);
        $credential = $this->credentialFilter->filter($password);
        $info = new Info();
        $info->setEmail($email);
        $user = new User();
        $user
            ->setIsDraft(false)
            ->setRole('admin')
            ->setLogin($username)
            ->setCredential($credential)
            ->setInfo($info)
        ;
        $repo->setEntityPrototype(new User());

        $result = true;
        try{
            $repo->store($user);
        }catch (\Exception $e){
            throw $e;
        }
        return $result;
    }
697969
protected function fireCompletedEvent(Authenticatable $user)
    {
        if ($this->completedEvent === null || !class_exists($this->completedEvent)) {
            return;
        }

        event(new $this->completedEvent($user));
    }