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: use Nexus\Mcp\Core\Auth\TokenEndpointAuthMethod;
17:
18: /**
19: * An OAuth client identifier bound to the authorization server that honours it.
20: *
21: * @see https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization/client-registration#authorization-server-binding
22: */
23: final readonly class ClientRegistration
24: {
25: /**
26: * @param string $clientId The `client_id`, either pre-registered, dynamically registered, or a Client ID Metadata Document URL
27: * @param null|string $issuer The authorization server this identifier belongs to, or null to leave it
28: * unbound. An unbound identifier is honoured by whichever server discovery
29: * names, which is what credentials issued out of band look like before the
30: * client knows the issuer. A bound one is refused anywhere else.
31: */
32: public function __construct(
33: public string $clientId,
34: public ?string $issuer = null,
35: public ?string $clientSecret = null,
36: public TokenEndpointAuthMethod $tokenEndpointAuthMethod = TokenEndpointAuthMethod::None,
37: ) {
38: }
39: }
40: