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