-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathindex.ts
More file actions
47 lines (42 loc) · 1.25 KB
/
index.ts
File metadata and controls
47 lines (42 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* Server Authentication Conformance Scenarios
*
* This module exports scenarios for testing MCP servers' OAuth implementation.
* These are client scenarios that connect to a server and verify its conformance
* with OAuth-related RFCs and the MCP authorization specification.
*/
import type { ClientScenario } from '../../types';
import { BasicDcrFlowScenario } from './basic-dcr-flow';
import { StepUpAuthScenario } from './step-up-auth';
// Re-export helpers and spec references
export * from './helpers/oauth-client';
export * from './spec-references';
export { BasicDcrFlowScenario } from './basic-dcr-flow';
export { StepUpAuthScenario } from './step-up-auth';
/**
* All server authentication scenarios.
*/
export const serverAuthScenarios: ClientScenario[] = [
new BasicDcrFlowScenario(),
new StepUpAuthScenario()
];
/**
* List all available server auth scenarios.
*/
export function listServerAuthScenarios(): {
name: string;
description: string;
}[] {
return serverAuthScenarios.map((s) => ({
name: s.name,
description: s.description
}));
}
/**
* Get a server auth scenario by name.
*/
export function getServerAuthScenario(
name: string
): ClientScenario | undefined {
return serverAuthScenarios.find((s) => s.name === name);
}