protected function SearchApiAcquiaSearchHttpTransport::validResponse in Acquia Search for Search API 7
Validate the authenticity of returned data using a nonce and HMAC-SHA1.
Return value
boolean TRUE or FALSE depending on whether the response is valid.
See also
acquia_search_valid_response()
1 call to SearchApiAcquiaSearchHttpTransport::validResponse()
- SearchApiAcquiaSearchHttpTransport::authenticateResponse in includes/
SearchApiAcquiaSearchHttpTransport.php - Validate the hmac for the response body.
File
- includes/
SearchApiAcquiaSearchHttpTransport.php, line 196 - Contains SearchApiAcquiaSearchHttpTransport.
Class
- SearchApiAcquiaSearchHttpTransport
- HTTP transport for connections to the Acquia Search Service.
Code
protected function validResponse($hmac, $nonce, $string, $derived_key = NULL) {
if (empty($derived_key)) {
$derived_key = $this
->derivedKey();
}
return $hmac == hash_hmac('sha1', $nonce . $string, $derived_key);
}