Yoast\WP\SEO\MyYoast_Client\Application\Grants
Grant_Interface{}
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
Методы
- public get_grant_params()
- public get_grant_type()
Код Grant_Interface{} 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;
}