Sets the request authentication instance for the given provider.
Parameters
$idOrClassNamestring|<span class="WordPressAiClientProvidersclass-string”>WordPressAiClientProvidersclass-stringrequired- The provider ID or class name.
$requestAuthenticationWordPressAiClientProvidersHttpContractsRequestAuthenticationInterfacerequired- The request authentication instance.
Source
public function setProviderRequestAuthentication(string $idOrClassName, RequestAuthenticationInterface $requestAuthentication): void
{
$className = $this->resolveProviderClassName($idOrClassName);
$this->providerAuthenticationInstances[$className] = $requestAuthentication;
$this->setRequestAuthenticationForProvider($className, $requestAuthentication);
}
Changelog
| Version | Description |
|---|---|
| 0.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.