获取拦截历史
@return UserLoginAttempt
334297
public function getUserLoginAttempt()
    {
        if (!$this->_attempt) {
            $this->_attempt = new UserLoginAttempt;
            $this->_attempt->key = $this->getKey();
        }
        return $this->_attempt;
    }
1352769
public function check()
    {
        $hasUser = $this->session->has('twitter.user_id') && $this->session->has('twitter.screen_name');

        return $this->hasSessionToken() && $hasUser;
    }
435013
public function getCurrentFailAttemptCount()
    {
        if (!$this->sessionBag->has(self::PARAM_ATTEMPT_NS)) {
            $this->reset();
        }

        return $this->sessionBag->get(self::PARAM_ATTEMPT_NS);
    }
738102
public function loginAction()
    {
        $return = $this->getReturnUri();
        $auth   = $this->getServiceLocator()
                       ->get( 'Zend\Authentication\AuthenticationService' );

        if ( $auth->hasIdentity() )
        {
            return $this->redirect()
                        ->toUrl( $this->getValidReturnUri( $return ) );
        }

        /* @var $form \Zend\Form\Form */
        $request = $this->getRequest();
        $data    = $request->getPost();
        $form    = $this->getServiceLocator()
                        ->get( 'Form' )
                        ->create( 'Grid\User\Login', array(
                            'returnUri' => $return,
                        ) );

        $form->setData( $data );

        if ( $request->isPost() )
        {
            if ( $form->isValid() )
            {
                /* @var $sessm \Zend\Session\SessionManager */
                /* @var $logger \Zork\Log\LoggerManager */
                $data   = $form->getData();
                $sessm  = $this->getSessionManager();
                $logger = $this->getServiceLocator()
                               ->get( 'Zork\Log\LoggerManager' );
                $result = $this->getServiceLocator()
                               ->get( 'Grid\User\Authentication\Service' )
                               ->login( $data, $sessm, $auth );

                $messages = $result->getMessages();

                if ( $result->isValid() )
                {
                    $sessm->regenerateId( false );

                    $this->messenger()
                         ->add( 'user.form.login.success',
                                'user', Message::LEVEL_INFO );

                    if ( $logger->hasLogger( 'application' ) )
                    {
                        $logger->getLogger( 'application' )
                               ->notice( 'user-login', array(
                                   'successful' => true,
                               ) );
                    }
                }
                else
                {
                    foreach ( $messages as $index => $message )
                    {
                        if ( is_int( $index ) && is_string( $message ) )
                        {
                            $this->messenger()
                                 ->add( $message, false, Message::LEVEL_WARN );
                        }
                    }

                    $this->messenger()
                         ->add( $this->getErrorMessageKey( $result->getCode() ),
                                'user', Message::LEVEL_ERROR );

                    if ( $logger->hasLogger( 'application' ) )
                    {
                        $logger->getLogger( 'application' )
                               ->warn( 'user-login', array(
                                   'successful' => false,
                               ) );
                    }
                }

                if ( empty( $messages['returnUri'] ) )
                {
                    if ( empty( $data['returnUri'] ) )
                    {
                        $returnUri = $return;
                    }
                    else
                    {
                        $returnUri = $data['returnUri'];
                    }
                }
                else
                {
                    $returnUri = $messages['returnUri'];
                }

                return $this->redirect()
                            ->toUrl( $this->getValidReturnUri( $returnUri ) );
            }
        }

        $this->plugin( 'layout' )
             ->setMiddleLayout( 'layout/middle/center' );

        return array(
            'form'      => $form,
            'display'   => $this->getServiceLocator()
                                ->get( 'Config' )
                                     [ 'modules' ]
                                     [ 'Grid\User' ]
                                     [ 'display' ]
        );
    }
977843
public function login()
    {
        if ($this->validate()) {
            return Podium::getInstance()->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0);
        }
        return false;
    }
614691
private function incrementLoginAttempts()
    {
        $rc = new LoginRateControlEntity();
        $rc->ip = $this->ip;
        $rc->username = $this->username;
        $rc->timestamp = time();
        $rc->save();
    }
1269331
protected function doLogin()
    {
        $connection = $this->connection;
        $user = $this->getParam('user');
        $password = $this->getParam('pass');

        return $this->retry(function () use ($connection, $user, $password) {
            $res = @ftp_login($connection, $user, $password);

            if (!$res) {
                throw new \RuntimeException("Login failed for user: ".$user);
            }
        });
    }
1283233
public function historyAction()
	{
		$client = \Aimeos\Client\Html::create( $this->getContext(), 'account/history' );
		return $this->getClientOutput( $client );
	}
607159
public function login()
    {
        if ($this->validate()) {
            $loginHistory = new LoginHistory(['ip' => Yii::$app->request->getUserIP()]);
            $loginHistory->link('user', $this->user);

            return Yii::$app->getUser()->login($this->user, $this->rememberFor);
        } else {
            return false;
        }
    }
979192
public function isLogged()
    {
        if (is_null($this->logged)) {
            $this->logged = (bool)is_user_logged_in();
        }

        return $this->logged;
    }
165544
public function login()
    {
        if ($this->validate()) {
            return Yii::getApp()->getUser()->login($this->getUser(), $this->rememberMe ? 3600*24*30 : 0);
        }
        return false;
    }
746343
public function loginAction()
	{
		$csrf_token = $this->has('security.csrf.token_manager')
			? $this->get('security.csrf.token_manager')->getToken('authenticate')->getValue()
			: null;
		
		$auth_utils = $this->get("security.authentication_utils");
		
		if ($auth_utils->getLastAuthenticationError()) {
			$this->addFlash("error-flash", "Your login or password are incorrect");
		}
		
		// last username entered by the user
		$last_username = $auth_utils->getLastUsername();
		
		return $this->render('@RibsAdmin/login/login.html.twig', array(
			'last_username' => $last_username,
			'csrf_token' => $csrf_token,
		));
	}
278759
public function login()
    {
        $this->authSessionId = $this->requestAuthSessionID($this->user,
            $this->password);
        return $this->lastResponseCode == 200;
    }
1084805
public function checkLogin()
    {
        $this->defaultData();
        $userService = $this->getServiceLocator()->get(tao_models_classes_UserService::class);
        if (!$this->isXmlHttpRequest()) {
            throw new common_exception_BadRequest('wrong request mode');
        }

        $data = array('available' => false);
        if ($this->hasRequestParameter('login')) {
            $data['available'] = $userService->loginAvailable($this->getRequestParameter('login'));
        }

        $this->returnJson($data);
    }
14811
static protected function userInfoExpiry()
    {
        /* Figure out when the last update was done */
        $handler = eZExpiryHandler::instance();
        if ( $handler->hasTimestamp( 'user-info-cache' ) )
        {
            $expiredTimestamp = $handler->timestamp( 'user-info-cache' );
        }
        else
        {
            $expiredTimestamp = time();
            $handler->setTimestamp( 'user-info-cache', $expiredTimestamp );
        }

        return $expiredTimestamp;
    }
264363
public function login()
    {
        //Tries to login with cookies, if the login with cookies is enabled
        if (getConfig('users.cookies_login')) {
            $this->loginWithCookie();
        }

        if ($this->request->is('post')) {
            $user = $this->Auth->identify();

            if ($user) {
                //Checks if the user is banned or if is disabled (the account
                //  should still be enabled)
                if ($user['banned'] || !$user['active']) {
                    if ($user['banned']) {
                        $this->Flash->error(__d('me_cms', 'Your account has been banned by an admin'));
                    } elseif (!$user['active']) {
                        $this->Flash->error(__d('me_cms', 'Your account has not been activated yet'));
                    }

                    return $this->buildLogout();
                }

                $this->Auth->setUser($user);

                $this->LoginRecorder->setConfig('user', $user['id'])->write();

                //Saves the login data as cookies, if requested
                if ($this->request->getData('remember_me')) {
                    $cookie = new Cookie('login', [
                        'username' => $this->request->getData('username'),
                        'password' => $this->request->getData('password'),
                    ], new DateTime('+1 year'));
                    $this->response = $this->response->withCookie($cookie);
                }

                return $this->redirect($this->Auth->redirectUrl());
            }

            if ($this->request->getData('username') && $this->request->getData('password')) {
                Log::error(sprintf(
                    '%s - Failed login with username `%s` and password `%s`',
                    $this->request->clientIp(),
                    $this->request->getData('username'),
                    $this->request->getData('password')
                ), 'users');
            }

            $this->Flash->error(__d('me_cms', 'Invalid username or password'));
        }

        $this->viewBuilder()->setLayout('login');
    }
1094982
public function login()
    {
        $module = UsersModule::module();
        if ($this->validate()) {
            return $this->user->login($this->rememberMe ? $module->loginDuration : 0);
        } else {
            return false;
        }
    }