protected function ResourceTestBase::getAuthenticationRequestOptions in Drupal 10
Same name in this branch
- 10 core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getAuthenticationRequestOptions()
- 10 core/modules/rest/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\rest\Functional\ResourceTestBase::getAuthenticationRequestOptions()
Same name and namespace in other branches
- 8 core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getAuthenticationRequestOptions()
- 9 core/modules/jsonapi/tests/src/Functional/ResourceTestBase.php \Drupal\Tests\jsonapi\Functional\ResourceTestBase::getAuthenticationRequestOptions()
Returns Guzzle request options for authentication.
Return value
array Guzzle request options to use for authentication.
See also
\GuzzleHttp\ClientInterface::request()
File
- core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php, line 2562
Class
- ResourceTestBase
- Subclass this for every JSON:API resource type.
Namespace
Drupal\Tests\jsonapi\FunctionalCode
protected function getAuthenticationRequestOptions() {
return [
'headers' => [
'Authorization' => 'Basic ' . base64_encode($this->account->name->value . ':' . $this->account->passRaw),
],
];
}