1: <?php
2:
3: declare(strict_types=1);
4:
5: /**
6: * This file is part of the Nexus MCP SDK package.
7: *
8: * (c) 2026 John Paul E. Balandan, CPA <paulbalandan@gmail.com>
9: *
10: * For the full copyright and license information, please view
11: * the LICENSE file that was distributed with this source code.
12: */
13:
14: namespace Nexus\Mcp\Client\Auth;
15:
16: /**
17: * Holds the client identifiers obtained through Dynamic Client Registration, keyed by the authorization
18: * server that issued them so credentials are never carried across a server change.
19: *
20: * @see https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/client-registration#authorization-server-binding
21: */
22: interface ClientRegistrationStoreInterface
23: {
24: /**
25: * @param string $issuer Issuer identifier of the authorization server the registration belongs to
26: */
27: public function read(string $issuer): ?ClientRegistration;
28:
29: public function write(string $issuer, ClientRegistration $registration): void;
30:
31: /**
32: * Drops a registration the authorization server no longer recognises, so the next resolution registers
33: * again rather than presenting an identifier that is spent.
34: */
35: public function forget(string $issuer): void;
36: }
37: