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: * What a client does when an MCP server answers that the scopes its token carries are insufficient.
18: *
19: * @see https://datatracker.ietf.org/doc/html/rfc6750#section-3.1
20: */
21: enum InsufficientScopePolicy
22: {
23: /**
24: * Ask the resource owner to grant the challenged scopes as well, then retry the request.
25: */
26: case Reauthorize;
27:
28: /**
29: * Raise `InsufficientScopeException` naming the scopes the server asked for, leaving the decision to
30: * the caller.
31: */
32: case Fail;
33: }
34: