src/Connection.php
protected function authenticate($password)
    {
        $message = new Message($password, Message::TYPE_AUTH);
        $response = $this->sendMessage($message);

        if ($response->getType() === Message::TYPE_AUTH_FAILURE) {
            throw new AuthenticationFailedException('Could not authenticate to the server.');
        }
    }
protected function authenticate($password)
    {
        $message = new Message($password, Message::TYPE_AUTH);
        $response = $this->sendMessage($message);

        if ($response->getType() === Message::TYPE_AUTH_FAILURE) {
            throw new AuthenticationFailedException('Could not authenticate to the server.');
        }
    }
protected function authenticate ( $ password ) { $ message = new Message ( $ password , Message :: TYPE_AUTH ) ; $ response = $ this -> sendMessage ( $ message ) ; if ( $ response -> getType ( ) === Message :: TYPE_AUTH_FAILURE ) { throw new AuthenticationFailedException ( 'Could not authenticate to the server.' ) ; } }
Authenticate with the server.

@param $password

@throws Exception\AuthenticationFailedException
Authenticate with the server .