protected function SearchApiAcquiaSearchConnectionV3::authenticateResponse in Acquia Search for Search API 7.2
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 SearchApiAcquiaSearchConnectionV3::authenticateResponse()
- SearchApiAcquiaSearchConnectionV3::makeServletRequest in includes/
v3/ SearchApiAcquiaSearchConnectionV3.php - Makes a request to a servlet (a path) that's not a standard path.
- SearchApiAcquiaSearchConnectionV3::sendRawGet in includes/
v3/ SearchApiAcquiaSearchConnectionV3.php - Sends a GET request to the Solr server.
- SearchApiAcquiaSearchConnectionV3::sendRawPost in includes/
v3/ SearchApiAcquiaSearchConnectionV3.php - Sends a PUT request to the Solr server.
File
- includes/
v3/ SearchApiAcquiaSearchConnectionV3.php, line 144
Class
- SearchApiAcquiaSearchConnectionV3
- Starting point for the Solr API. Represents a Solr server resource and has methods for pinging, adding, deleting, committing, optimizing and searching.
Code
protected function authenticateResponse($response, $nonce, $url) {
$hmac = $this
->extractHmac($response->headers);
if (!$this
->isValidResponse($hmac, $nonce, $response->data, NULL)) {
throw new Exception('Authentication of search content failed url: ' . $url);
}
return $response;
}