Skip to content

OAuthResources

Namespace: Vercel.AI.Mcp

public static class OAuthResources

OAuth resource URL checks from the MCP authorization helper.

Inheritance: object

View source

public static bool CheckResourceAllowed(string requestedResource, string configuredResource)

True when the requested resource has the same origin and its path is under the configured path. A path matches itself and its children, not a different prefix such as /mcpxxxx for /mcp.

Parameters

Name Type Description
requestedResource string
configuredResource string

Returns: bool

View source

public static string ResourceUrlFromServerUrl(string url)

Removes the fragment. The result uses the absolute URI form.

Parameters

Name Type Description
url string

Returns: string

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product