CoreFiles by mySites.guru
RequestAuthenticationMethod.php39 lines, 1,252 bytes, from wordpress-7.2-beta5.zip
Raw History Compare with 7.2-beta4
md5
369ccbf7b4320651ee0239c0b9c876f0
sha1
423f4da51f56b9920dc82f392e1689c6f6df965f
sha256
f013679a8b0bd3d1210bf38f4a82847ec9546ab29d9619ed35b851e5642081e6
<?php

declare (strict_types=1);
namespace WordPress\AiClient\Providers\Http\Enums;

use WordPress\AiClient\Common\AbstractEnum;
use WordPress\AiClient\Common\Contracts\WithArrayTransformationInterface;
use WordPress\AiClient\Providers\Http\Contracts\RequestAuthenticationInterface;
use WordPress\AiClient\Providers\Http\DTO\ApiKeyRequestAuthentication;
/**
 * Enum for request authentication methods.
 *
 * @since 0.4.0
 *
 * @method static self apiKey() Creates an instance for API_KEY method.
 * @method bool isApiKey() Checks if the method is API_KEY.
 */
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;
    }
}

The same content is in 39 releases, WordPress 7.0-beta1 to 7.2-beta5. See them all, or every version of this file.