public function authenticate(SSHAuthentication $auth, SSHConnection $context) { if (!$auth->authenticate($this->resource)) { throw new \RuntimeException('Authentication Failure'); } $this->nextState(new SSHStateListening(), $context); return true; }
public function authenticate(SSHAuthentication $auth) { $auth->authenticate($this->resource); }