generateWWWAuthenticateHeader (shared/oauth-types.ts)

mastra · packages/mcp/src/shared/oauth-types.ts · typescript · Apache-2.0
auth

Re-exports and extends MCP OAuth types for authentication configuration and token validation.

// Source: https://github.com/mastra-ai/mastra | License: Apache-2.0 | Copyright 2025 Kepler Software, Inc
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * OAuth Types for MCP Authentication
 *
 * Re-exports and extends the MCP OAuth types for use in Mastra's MCP client and
 * server implementations. The OAuth metadata shapes are identical across the
 * MCP packages, so both sides source them from `@modelcontextprotocol/client`
 * alongside the OAuth flow helpers below.
 *
 * @see https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization
 */
import type { OAuthProtectedResourceMetadata as SDKOAuthProtectedResourceMetadata } from '@modelcontextprotocol/client';

export type {
  OAuthMetadata,
  OAuthTokens,
  OAuthErrorResponse,
  OAuthClientMetadat

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key