You are here

protected function AcquiaSearchSolrService::authenticateResponse in Acquia Connector 7.3

Makes authentication checks.

Parameters

object $response: Response object.

string $nonce: Nonce.

string $url: Request URL.

Return value

mixed Throws exception in case of authentication check fail.

Throws

\Exception

3 calls to AcquiaSearchSolrService::authenticateResponse()
AcquiaSearchSolrService::makeServletRequest in acquia_search/includes/AcquiaSearchSolrService.php
Make a request to a servlet (a path) that's not a standard path.
AcquiaSearchSolrService::_sendRawGet in acquia_search/includes/AcquiaSearchSolrService.php
Central method for making a GET operation against this Solr Server
AcquiaSearchSolrService::_sendRawPost in acquia_search/includes/AcquiaSearchSolrService.php
Central method for making a POST operation against this Solr Server

File

acquia_search/includes/AcquiaSearchSolrService.php, line 139

Class

AcquiaSearchSolrService
Class AcquiaSearchSolrService.

Code

protected function authenticateResponse($response, $nonce, $url) {
  $hmac = $this
    ->extractHmac($response->headers);
  if (!$this
    ->isValidResponse($hmac, $nonce, $response->data, NULL, $this->env_id)) {
    throw new Exception('Authentication of search content failed url: ' . $url);
  }
  return $response;
}