protected function SearchApiAcquiaSearchHttpTransport::extractHmac in Acquia Search for Search API 7
Look in the headers and get the hmac_digest out.
See also
1 call to SearchApiAcquiaSearchHttpTransport::extractHmac()
- SearchApiAcquiaSearchHttpTransport::authenticateResponse in includes/
SearchApiAcquiaSearchHttpTransport.php - Validate the hmac for the response body.
File
- includes/
SearchApiAcquiaSearchHttpTransport.php, line 176 - Contains SearchApiAcquiaSearchHttpTransport.
Class
- SearchApiAcquiaSearchHttpTransport
- HTTP transport for connections to the Acquia Search Service.
Code
protected function extractHmac($headers) {
$reg = array();
if (is_array($headers)) {
foreach ($headers as $name => $value) {
if (strtolower($name) == 'pragma' && preg_match("/hmac_digest=([^;]+);/i", $value, $reg)) {
return trim($reg[1]);
}
}
}
return '';
}