WordPress\AiClient\Providers\Http\Enums
RequestAuthenticationMethod{}└─ AbstractEnum
Enum for request authentication methods.
No Hooks.
Usage
$RequestAuthenticationMethod = new RequestAuthenticationMethod(); // use class methods
Methods
- public getImplementationClass()
Changelog
| Since 0.4.0 | Introduced. |
RequestAuthenticationMethod{} RequestAuthenticationMethod{} code WP 7.0
class RequestAuthenticationMethod extends AbstractEnum
{
/**
* API key authentication.
*/
public const API_KEY = 'api_key';
/**
* Gets the implementation class for the authentication method.
*
* @since 0.4.0
*
* @return class-string<RequestAuthenticationInterface&WithArrayTransformationInterface> The implementation class.
*
* @phpstan-ignore missingType.generics
*/
public function getImplementationClass(): string
{
// At the moment, this is the only supported method.
// Once more methods are available, add conditionals here for each method.
return ApiKeyRequestAuthentication::class;
}
}