# wordpress-seo/27.8/src/ai/authorization/infrastructure/token-user-meta-repository-interface.php

Yoast SEO – Advanced SEO with real-time guidance and built-in AI, version 27.8. 40 lines.

- Page: https://pluginprobe.com/plugins/wordpress-seo/27.8/code/src/ai/authorization/infrastructure/token-user-meta-repository-interface.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/27.8/raw/src/ai/authorization/infrastructure/token-user-meta-repository-interface.php
- Modified: 2026-03-17T12:01:04+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wordpress-seo/27.8/code/src/ai/authorization/infrastructure/token-user-meta-repository-interface.php#L10-L20`.

```php
<?php

// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.

namespace Yoast\WP\SEO\AI\Authorization\Infrastructure;

/**
 * Interface Token_Repository_Interface
 */
interface Token_User_Meta_Repository_Interface {

	/**
	 * Get the token for a user.
	 *
	 * @param int $user_id The user ID.
	 *
	 * @return string The token data.
	 */
	public function get_token( int $user_id ): string;

	/**
	 * Store the token for a user.
	 *
	 * @param int    $user_id The user ID.
	 * @param string $value   The token value.
	 *
	 * @return void
	 */
	public function store_token( int $user_id, string $value ): void;

	/**
	 * Delete the token for a user.
	 *
	 * @param int $user_id The user ID.
	 *
	 * @return void
	 */
	public function delete_token( int $user_id ): void;
}

```
