| 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\Core\Auth; |
| 15: | |
| 16: | /** |
| 17: | * The client authentication methods an MCP client offers at an authorization server's token endpoint. |
| 18: | * |
| 19: | * @see https://datatracker.ietf.org/doc/html/rfc8414#section-2 |
| 20: | */ |
| 21: | enum TokenEndpointAuthMethod: string |
| 22: | { |
| 23: | /** |
| 24: | * Client identifier and secret in an HTTP Basic `Authorization` header. |
| 25: | */ |
| 26: | case ClientSecretBasic = 'client_secret_basic'; |
| 27: | |
| 28: | /** |
| 29: | * Client identifier and secret in the request body. |
| 30: | */ |
| 31: | case ClientSecretPost = 'client_secret_post'; |
| 32: | |
| 33: | /** |
| 34: | * Public client, authenticating with its client identifier alone. |
| 35: | */ |
| 36: | case None = 'none'; |
| 37: | } |
| 38: |