Fire the attempt event with the arguments.

@param  array  $credentials
@param  bool   $remember
@param  bool   $login
@return void
437855
protected function fireAttemptEvent(array $credentials, $remember, $login)
	{
		if ($this->events)
		{
			$payload = array($credentials, $remember, $login);

			$this->events->fire('auth.attempt', $payload);
		}
	}
167210
protected function performLogin($user, $rememberMe = true)
    {
        // log user in
        $loginDuration = $rememberMe ? $this->module->loginDuration : 0;
        Yii::$app->user->login($user, $loginDuration);

        // check for a valid returnUrl (to prevent a weird login bug)
        //   https://github.com/amnah/yii2-user/issues/115
        $loginRedirect = $this->module->loginRedirect;
        $returnUrl = Yii::$app->user->getReturnUrl($loginRedirect);
        if (strpos($returnUrl, "user/login") !== false || strpos($returnUrl, "user/logout") !== false) {
            $returnUrl = null;
        }

        return $returnUrl;
    }
1177340
public function setAuthCredentials($username, $password)
    {
        trigger_error('setAuthCredentials is deprecated. Use setAuth with proper authentifier', E_USER_DEPRECATED);
        $this->setAuth(new Authentication\LoginPasswordAuth($username, $password));
    }
1323322
public function authenticate(Login $login, Firewall $firewall)
    {
        try {
            $result = $firewall->verifyPasswordHash($login->getPassword(), $this->getPassword());
        } catch (\Exception $e) {
            throw new MemoryException($e->getMessage());
        }

        return $result;
    }
749581
public function attempt(array $credentials = [], $remember = false, $login = true)
    {
        // we do thing if the user is allowed to login with only username or
        // only password
        if ((config('taki.login_by') == 'both') && isset($credentials[config('taki.field.both')])) {
            $login = $credentials[config('taki.field.both')];
            unset($credentials[config('taki.field.both')]);
            if (isset($credentials[config('taki.field.username')])) {
                unset($credentials[config(['taki.field.username'])]);
            }
            if (isset($credentials[config('taki.field.email')])) {
                unset($credentials[config('taki.field.email')]);
            }
            if (filter_var($login, FILTER_VALIDATE_EMAIL)) {
                $credentials[config('taki.field.email')] = $login;
            } else {
                $credentials[config('taki.field.username')] = $login;
            }
        }

        return $this->auth->attempt($credentials, $remember, $login);
    }
97055
public function login(UserInterface $user, $remember = false)
    {
        $method = $remember === true ? 'persistAndRemember' : 'persist';

        $this->persistences->{$method}($user);

        $response = $this->users->recordLogin($user);

        if ($response === false) {
            return false;
        }

        return $this->user = $user;
    }
149342
public function authenticate($credentials, $remember = false, $login = true)
    {
        return $this->sentinel->authenticate($credentials, $remember, $login);
    }
516314
protected function fireLoginEvent($user, $remember = FALSE)
    {
        if (isset($this->events)) {
            $this->events->dispatch(new Login($user, $remember));
        }
    }
272681
public function forceAuthenticate($credentials, $remember = false)
    {
        return $this->bypassCheckpoints(function ($sentinel) use ($credentials, $remember) {
            return $sentinel->authenticate($credentials, $remember);
        });
    }
499887
public function trackAttempt($username, $password)
    {
        if (!$this->config->get('concrete.user.deactivation.authentication_failure.enabled', false)) {
            return $this;
        }

        $user = $this->resolveUser($username);
        if (!$user) {
            return;
        }

        $attempt = new LoginAttempt();
        $attempt->setUtcDate(Carbon::now('UTC'));
        $attempt->setUserId($user->getUserID());
        $this->entityManager->persist($attempt);

        // Make sure we get flushed with the next batch
        $this->batch[] = $attempt;

        // Prune old attempts
        $this->pruneAttempts();

        return $this;
    }
921538
public function reset(array $credentials, Closure $callback)
    {
        // If the responses from the validate method is not a user instance, we will
        // assume that it is a redirect and simply return it from this method and
        // the user is properly redirected having an error message on the post.
        $user = $this->validateReset($credentials);

        if (! $user instanceof CanResetPasswordContract) {
            return $user;
        }

        $password = $credentials['password'];

        // Once the reset has been validated, we'll call the given callback with the
        // new password. This gives the user an opportunity to store the password
        // in their persistent storage.
        $callback($user, $password);

        return static::PASSWORD_RESET;
    }
916634
public function login(UserContract $user, $remember = false)
	{
		$this->updateSession($user->getAuthIdentifier());

		// If the user should be permanently "remembered" by the application we will
		// queue a permanent cookie that contains the encrypted copy of the user
		// identifier. We will then decrypt this later to retrieve the users.
		if ($remember)
		{
			$this->createRememberTokenIfDoesntExist($user);

			$this->queueRecallerCookie($user);
		}

		// If we have an event dispatcher instance set we will fire an event so that
		// any listeners will hook into the authentication events and run actions
		// based on the login and logout events fired from the guard instances.
		$this->fireLoginEvent($user, $remember);

		$this->setUser($user);
	}
891980
public function attempt(array $credentials = [], $login = true)
    {
        $user = $this->getProvider()->retrieveByCredentials($credentials);
        if ($user instanceof Authenticatable && $this->hasValidCredentials($user, $credentials)) {
            if ($login === true) {
                $this->login($user);
            }
            return true;
        }
        return false;
    }
959880
protected function fireAttemptEvent(array $credentials)
    {
        if (isset($this->events)) {
            $this->events->dispatch(new Attempting(
                $credentials, false
            ));
        }
    }
764481
public function login(User $user, $remember = false)
    {
        return $this->sentinel->login($user, $remember);
    }
757837
public static function handler(array $credentials = array()) {

		$calendar_guid = elgg_extract('calendar_guid', $credentials);
		$user_guid = elgg_extract('user_guid', $credentials);
		$token = elgg_extract('token', $credentials);

		$ia = elgg_set_ignore_access(true);
		$calendar = get_entity($calendar_guid);
		$user = get_entity($user_guid);
		elgg_set_ignore_access($ia);

		$pam = new PAM($calendar, $user);

		if (!has_access_to_entity($calendar, $user)) {
			throw new LoginException('User does not have access to this calendar');
		}

		if (!$calendar->getToken()) {
			throw new LoginException('Calendar does not allow remote access');
		}

		if (!$pam->validateToken($token)) {
			throw new LoginException('Invalid token');
		}

		return true;
	}
395410
public function execute() {
        global $DB, $CFG;

        require_once($CFG->dirroot . '/auth/mnet/auth.php');
        $mnetplugin = new \auth_plugin_mnet();
        $mnetplugin->keepalive_client();

        $random100 = rand(0,100);
        if ($random100 < 10) {
            $longtime = time() - DAYSECS;
            $DB->delete_records_select('mnet_session', "expires < ?", [$longtime]);
        }
    }