You are here

private function AcquiaSearchSolrService::createAuthCookie in Acquia Connector 7.3

Creates auth cookie.

Parameters

string $url: Request URL.

string $nonce: Nonce.

string $string: Payload.

Return value

string Cookie.

1 call to AcquiaSearchSolrService::createAuthCookie()
AcquiaSearchSolrService::prepareRequest in acquia_search/includes/AcquiaSearchSolrService.php
Prepares request before send.

File

acquia_search/includes/AcquiaSearchSolrService.php, line 163

Class

AcquiaSearchSolrService
Class AcquiaSearchSolrService.

Code

private function createAuthCookie($url, $nonce, $string = '') {
  if (!empty($string)) {
    $auth_string = $this
      ->buildAuthString($string, $nonce);
    return $auth_string;
  }
  $uri = parse_url($url);
  $path = isset($uri['path']) ? $uri['path'] : '/';
  $query = isset($uri['query']) ? '?' . $uri['query'] : '';
  $auth_string = $this
    ->buildAuthString($path . $query, $nonce);
  return $auth_string;
}