WordPress\AiClient\Providers\Http\DTO

ApiKeyRequestAuthentication::authenticateRequest │ public │ WP 0.1.0

{@inheritDoc}

Метод класса: ApiKeyRequestAuthentication{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$ApiKeyRequestAuthentication = new ApiKeyRequestAuthentication();
$ApiKeyRequestAuthentication->authenticateRequest( $request ): \WordPress\AiClient\Providers\Http\DTO\Request;
$request([WordPress\AiClient\Providers\Http\DTO\Request]()) (обязательный)
.

Список изменений

С версии 0.1.0 Введена.

Код ApiKeyRequestAuthentication::authenticateRequest() WP 7.1.2

public function authenticateRequest(\WordPress\AiClient\Providers\Http\DTO\Request $request): \WordPress\AiClient\Providers\Http\DTO\Request
{
    // Add the API key to the request headers.
    return $request->withHeader('Authorization', 'Bearer ' . $this->apiKey);
}