OAuthResources
Namespace: Vercel.AI.Mcp
public static class OAuthResourcesOAuth resource URL checks from the MCP authorization helper.
Inheritance: object
Methods
Section titled “Methods”CheckResourceAllowed(string, string)
Section titled “CheckResourceAllowed(string, string)”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
ResourceUrlFromServerUrl(string)
Section titled “ResourceUrlFromServerUrl(string)”public static string ResourceUrlFromServerUrl(string url)Removes the fragment. The result uses the absolute URI form.
Parameters
| Name | Type | Description |
|---|---|---|
url |
string |
Returns: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product