[scenario] authz metadata discovery tests: compatibility with 2025-03-26 spec, prm root, and www-authenticate (#28)
* clean up constructor calls for server lifecycle * add back compat test * fix dup logging, rm prm * avoid fallbacks * better error from example client * add final endpoint method * add test for OASM priority order * s/prepack/prepare/ for npx * try switching to .js * make tsdown version happy default * fix lock * fix prmPath issue * back to main package-lock * fix bin path * Add comprehensive auth scenario test suite - Add index.test.ts to test all auth scenarios with auth-test.ts client - Upgrade @modelcontextprotocol/sdk from 1.20.1 to 1.22.0 - All 5 auth scenarios now pass including auth/basic-metadata-var2 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * consolidate tests into index.test.ts * rename metadata * fix comments * rework auth scenario listing * add 3rd variation of metadata * fix some type issues introduced by version bump * add reusable spec references * more refs * fix up spec references --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
38443d1a43
commit
f7c8c4460f
1 changed files with 724 additions and 230 deletions
44
src/scenarios/client/auth/spec-references.ts
Normal file
44
src/scenarios/client/auth/spec-references.ts
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
import { SpecReference } from '../../../types';
|
||||
|
||||
export const SpecReferences: { [key: string]: SpecReference } = {
|
||||
RFC_PRM_DISCOVERY: {
|
||||
id: 'RFC-9728',
|
||||
url: 'https://www.rfc-editor.org/rfc/rfc9728.html#section-3.1'
|
||||
},
|
||||
RFC_AUTH_SERVER_METADATA_REQUEST: {
|
||||
id: 'RFC-8414-metadata-request',
|
||||
url: 'https://www.rfc-editor.org/rfc/rfc8414.html#section-3.1'
|
||||
},
|
||||
LEGACY_2025_03_26_AUTH_DISCOVERY: {
|
||||
id: 'MCP-2025-03-26-Authorization-metadata-discovery',
|
||||
url: 'https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization#server-metadata-discovery'
|
||||
},
|
||||
LEGACY_2025_03_26_AUTH_URL_FALLBACK: {
|
||||
id: 'MCP-2025-03-26-Authorization-metadata-url-fallback',
|
||||
url: 'https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization#fallbacks-for-servers-without-metadata-discovery'
|
||||
},
|
||||
MCP_PRM_DISCOVERY: {
|
||||
id: 'MCP-2025-06-18-PRM-discovery',
|
||||
url: 'https://modelcontextprotocol.io/specification/draft/basic/authorization#protected-resource-metadata-discovery-requirements'
|
||||
},
|
||||
MCP_AUTH_DISCOVERY: {
|
||||
id: 'MCP-Authorization-metadata-discovery',
|
||||
url: 'https://modelcontextprotocol.io/specification/draft/basic/authorization#authorization-server-metadata-discovery'
|
||||
},
|
||||
MCP_DCR: {
|
||||
id: 'MCP-Dynamic-client-registration',
|
||||
url: 'https://modelcontextprotocol.io/specification/draft/basic/client#dynamic-client-registration'
|
||||
},
|
||||
OAUTH_2_1_AUTHORIZATION_ENDPOINT: {
|
||||
id: 'OAUTH-2.1-authorization-endpoint',
|
||||
url: 'https://www.ietf.org/archive/id/draft-ietf-oauth-v2-1-13.html#name-authorization-endpoint'
|
||||
},
|
||||
OAUTH_2_1_TOKEN: {
|
||||
id: 'OAUTH-2.1-token-request',
|
||||
url: 'https://www.ietf.org/archive/id/draft-ietf-oauth-v2-1-13.html#name-token-request'
|
||||
},
|
||||
MCP_ACCESS_TOKEN_USAGE: {
|
||||
id: 'MCP-Access-token-usage',
|
||||
url: 'https://modelcontextprotocol.io/specification/draft/basic/authorization#access-token-usage'
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue