src/controllers/LoginController.php
public function actionAsyncToken()
    {
        if (($lockout = $this->sessionBruteForceLock())) {
            return $this->sendArray(false, [Module::t('login_async_submission_limit_reached', ['time' =>  Yii::$app->formatter->asRelativeTime($lockout)])]);
        }
        
        $secureToken = Yii::$app->request->post('secure_token', false);
        
        $model = new LoginForm();
        $model->secureTokenExpirationTime = $this->module->secureTokenExpirationTime;
        
        if ($secureToken) {
            $user = $model->validateSecureToken($secureToken, Yii::$app->session->get('secureId'));

            if ($user && Yii::$app->adminuser->login($user)) {
                Yii::$app->session->remove('secureId');
                return $this->sendArray(true);
            }
            
            return $this->sendArray(false, [Module::t('login_async_token_error')]);
        }

        return $this->sendArray(false, [Module::t('login_async_token_globalerror')]);
    }
public function actionAsyncToken()
    {
        if (($lockout = $this->sessionBruteForceLock())) {
            return $this->sendArray(false, [Module::t('login_async_submission_limit_reached', ['time' =>  Yii::$app->formatter->asRelativeTime($lockout)])]);
        }
        
        $secureToken = Yii::$app->request->post('secure_token', false);
        
        $model = new LoginForm();
        $model->secureTokenExpirationTime = $this->module->secureTokenExpirationTime;
        
        if ($secureToken) {
            $user = $model->validateSecureToken($secureToken, Yii::$app->session->get('secureId'));

            if ($user && Yii::$app->adminuser->login($user)) {
                Yii::$app->session->remove('secureId');
                return $this->sendArray(true);
            }
            
            return $this->sendArray(false, [Module::t('login_async_token_error')]);
        }

        return $this->sendArray(false, [Module::t('login_async_token_globalerror')]);
    }
public function actionAsyncToken ( ) { if ( ( $ lockout = $ this -> sessionBruteForceLock ( ) ) ) { return $ this -> sendArray ( false , [ Module :: t ( 'login_async_submission_limit_reached' , [ 'time' => Yii :: $ app -> formatter -> asRelativeTime ( $ lockout ) ] ) ] ) ; } $ secureToken = Yii :: $ app -> request -> post ( 'secure_token' , false ) ; $ model = new LoginForm ( ) ; $ model -> secureTokenExpirationTime = $ this -> module -> secureTokenExpirationTime ; if ( $ secureToken ) { $ user = $ model -> validateSecureToken ( $ secureToken , Yii :: $ app -> session -> get ( 'secureId' ) ) ; if ( $ user && Yii :: $ app -> adminuser -> login ( $ user ) ) { Yii :: $ app -> session -> remove ( 'secureId' ) ; return $ this -> sendArray ( true ) ; } return $ this -> sendArray ( false , [ Module :: t ( 'login_async_token_error' ) ] ) ; } return $ this -> sendArray ( false , [ Module :: t ( 'login_async_token_globalerror' ) ] ) ; }
Async Secure Token Login.

@return array
Async Secure Token Login .