| 1 |
<?php |
| 2 |
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure. |
| 3 |
|
| 4 |
namespace Yoast\WP\SEO\MyYoast_Client\Application\Ports; |
| 5 |
|
| 6 |
use Yoast\WP\SEO\MyYoast_Client\Application\Exceptions\Client_Authentication_Exception; |
| 7 |
|
| 8 |
/** |
| 9 |
* Port for OAuth client authentication (private_key_jwt). |
| 10 |
*/ |
| 11 |
interface Client_Authenticator_Interface { |
| 12 |
|
| 13 |
/** |
| 14 |
* Creates a signed client_assertion JWT for the given audience. |
| 15 |
* |
| 16 |
* @param string $client_id The registered client_id. |
| 17 |
* @param string $audience The audience URL (typically the token endpoint). |
| 18 |
* |
| 19 |
* @return string The signed client_assertion JWT. |
| 20 |
* |
| 21 |
* @throws Client_Authentication_Exception If key retrieval or signing fails. |
| 22 |
*/ |
| 23 |
public function create_client_assertion( string $client_id, string $audience ): string; |
| 24 |
} |
| 25 |
|