Pantheon\Terminus\Models\SavedToken::logIn PHP 메소드

logIn() 공개 메소드

Starts a session with this saved token
public logIn ( ) : User
리턴 User An object representing the now-logged-in user
    public function logIn()
    {
        $options = ['form_params' => ['machine_token' => $this->get('token'), 'client' => 'terminus'], 'method' => 'post'];
        $response = $this->request->request('authorize/machine-token', $options);
        $this->session()->setData((array) $response['data']);
        return $this->session->getUser();
    }