ApiKeyRequestAuthentication::authenticateRequest( $request )

In this article

{@inheritDoc}

Source

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);
}

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.