Pantheon\Terminus\Authorizer::ensureLogin PHP Метод

ensureLogin() публичный Метод

TODO: Currently this is not being triggered when commands using it are run.
public ensureLogin ( )
    public function ensureLogin()
    {
        if (!$this->session()->isActive()) {
            if (count($tokens = $this->session()->getTokens()->all()) == 1) {
                $token = array_shift($tokens);
            } elseif (!empty($email = $this->getConfig()->get('user'))) {
                $token = $this->session()->getTokens()->get($email);
            } else {
                throw new \Exception('You are not logged in. Run `auth:login` to authenticate or `help auth:login` for more info.');
            }
            $token->logIn();
        }
    }
Authorizer