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 unbound.
28: * @param null|int<0, max> $clientSecretExpiresAt Seconds since the epoch at which `client_secret` expires, `0` when it never does, or null when the server named none.
29: *
30: * @see https://datatracker.ietf.org/doc/html/rfc7591#section-3.2.1
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: public ?int $clientSecretExpiresAt = null,
38: ) {
39: }
40: }
41: