protected function ApiDocsJsonApi::getAuthenticationRequestOptions in Apigee API Catalog 8
Same name and namespace in other branches
- 8.2 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 189
Class
- ApiDocsJsonApi
- Tests listing API Docs using JSON:API.
Namespace
Drupal\Tests\apigee_api_catalog\FunctionalCode
protected function getAuthenticationRequestOptions($account) {
return [
'headers' => [
'Authorization' => 'Basic ' . base64_encode($account->name->value . ':' . $account->passRaw),
],
];
}