public function SearchApiAcquiaSearchHttpTransport::authenticateResponse in Acquia Search for Search API 7
Validate the hmac for the response body.
Return value
The response object.
File
- includes/
SearchApiAcquiaSearchHttpTransport.php, line 163 - Contains SearchApiAcquiaSearchHttpTransport.
Class
- SearchApiAcquiaSearchHttpTransport
- HTTP transport for connections to the Acquia Search Service.
Code
public function authenticateResponse($response, $nonce, $url) {
$hmac = $this
->extractHmac($response->headers);
if (!$this
->validResponse($hmac, $nonce, $response->data)) {
throw new Exception('Authentication of search content failed url: ' . $url);
}
return $response;
}