AuthorizationResult encapsulates OAuth authorization outcomes with static factory methods.
// Source: https://github.com/modelcontextprotocol/php-sdk | License: Apache-2.0 // Provided via justclaw.it.com; keep this notice with the code. <?php /* * This file is part of the official PHP MCP SDK. * * A collaboration between Symfony and the PHP Foundation. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Mcp\Server\Transport\Http\OAuth; use Mcp\Server\Authorization\AccessToken; /** * Describes the outcome of an authorization decision. * * Use the static factory methods to create instances: * - allow() - Access is granted * - unauthorized() - No valid credentials provided (401) * - forbidden() - Valid credentials but insufficient permissions (403) * - badRequest() - Malformed ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key