protected function SearchSubscriber::authenticateResponse in Acquia Search Multiple Indexes 8
Validate the hmac for the response body.
Parameters
$response:
$nonce:
$url:
Return value
Solarium\Core\Client\Response
Throws
\Exception
1 call to SearchSubscriber::authenticateResponse()
- SearchSubscriber::postExecuteRequest in src/
EventSubscriber/ SearchSubscriber.php - Validate response.
File
- src/
EventSubscriber/ SearchSubscriber.php, line 85
Class
Namespace
Drupal\acquia_search_multi_subs\EventSubscriberCode
protected function authenticateResponse($response, $nonce, $url) {
$hmac = $this
->extractHmac($response
->getHeaders());
if (!$this
->validateResponse($hmac, $nonce, $response
->getBody(), NULL, $this->client
->getEndpoint()
->getOption('core'))) {
throw new HttpException('Authentication of search content failed url: ' . $url);
}
return $response;
}