Yoast\WP\SEO\MyYoast_Client\Application\Grants

Grant_Interface{}interfaceYoast 1.0

Interface for OAuth grant types.

Each implementation provides the grant-specific parameters for a token endpoint request. The shared logic (client assertion, error handling) is handled by OAuth_Grant_Handler.

Хуков нет.

Использование

$Grant_Interface = new Grant_Interface();
// use class methods

Методы

  1. public get_grant_params()
  2. public get_grant_type()

Код Grant_Interface{} Yoast 27.7

interface Grant_Interface {

	/**
	 * Returns the OAuth grant type identifier (e.g. "authorization_code").
	 *
	 * @return string
	 */
	public function get_grant_type(): string;

	/**
	 * Returns the grant-specific parameters to merge into the token request body.
	 *
	 * @return array<string, string> The parameters (e.g. code, redirect_uri, refresh_token).
	 */
	public function get_grant_params(): array;
}