You are here

protected function ApiDocsJsonApi::getAuthenticationRequestOptions in Apigee API Catalog 8.2

Same name and namespace in other branches
  1. 8 tests/src/Functional/ApiDocsJsonApi.php \Drupal\Tests\apigee_api_catalog\Functional\ApiDocsJsonApi::getAuthenticationRequestOptions()

Returns Guzzle request options for authentication.

Return value

array Guzzle request options to use for authentication.

See also

\GuzzleHttp\ClientInterface::request()

1 call to ApiDocsJsonApi::getAuthenticationRequestOptions()
ApiDocsJsonApi::verifyAccess in tests/src/Functional/ApiDocsJsonApi.php
Verify the account has access when making JSON:API call.

File

tests/src/Functional/ApiDocsJsonApi.php, line 166

Class

ApiDocsJsonApi
Tests listing API Docs using JSON:API.

Namespace

Drupal\Tests\apigee_api_catalog\Functional

Code

protected function getAuthenticationRequestOptions($account) {
  return [
    'headers' => [
      'Authorization' => 'Basic ' . base64_encode($account->name->value . ':' . $account->passRaw),
    ],
  ];
}