/**
  * @param ehough_shortstop_api_HttpRequest      $httpRequest
  * @param ehough_coauthor_api_v1_AbstractServer $server
  *
  * @return ehough_shortstop_api_HttpResponse
  *
  * @throws ehough_coauthor_api_exception_RuntimeException
  */
 private function _getHttpResponse(ehough_shortstop_api_HttpRequest $httpRequest, ehough_coauthor_api_v1_AbstractServer $server)
 {
     $server->onCredentialsOrTokenRequest($httpRequest);
     try {
         $httpResponse = $this->_httpClient->execute($httpRequest);
     } catch (ehough_shortstop_api_exception_RuntimeException $e) {
         throw new ehough_coauthor_api_exception_RuntimeException($e->getMessage());
     }
     $server->onAfterCredentialsOrTokenRequest($httpRequest, $httpResponse);
     return $httpResponse;
 }
 private function _fetchStoredTemporaryCredentials(ehough_coauthor_api_v1_AbstractServer $server, $temporaryCredentialsId)
 {
     $temporaryCredentials = $this->_credentialsStorage->retrieve($temporaryCredentialsId);
     if (!$temporaryCredentials) {
         throw new ehough_coauthor_api_exception_RuntimeException('No temporary credentials found. Unable to fetch access tokens for ' . $server->getFriendlyName());
     }
     return $temporaryCredentials;
 }