feat(server): add request-time OAuth scope challenges (#1624)
Some checks failed
Conformance Tests / client-conformance (push) Has been cancelled
Conformance Tests / server-conformance (push) Has been cancelled
Deploy Docs / deploy-docs (push) Has been cancelled
Examples / examples (build + e2e) (push) Has been cancelled
/ build (push) Has been cancelled
/ test (20) (push) Has been cancelled
/ test (22) (push) Has been cancelled
/ test (24) (push) Has been cancelled
/ test-e2e (20) (push) Has been cancelled
/ test-e2e (22) (push) Has been cancelled
/ test-e2e (24) (push) Has been cancelled
/ test-runtimes (bun, 1.x) (push) Has been cancelled
/ test-runtimes (deno, v2.x) (push) Has been cancelled
Publish Any Commit / pkg-publish (push) Has been cancelled
Release / Version (push) Has been cancelled
Release / Publish (push) Has been cancelled
Some checks failed
Conformance Tests / client-conformance (push) Has been cancelled
Conformance Tests / server-conformance (push) Has been cancelled
Deploy Docs / deploy-docs (push) Has been cancelled
Examples / examples (build + e2e) (push) Has been cancelled
/ build (push) Has been cancelled
/ test (20) (push) Has been cancelled
/ test (22) (push) Has been cancelled
/ test (24) (push) Has been cancelled
/ test-e2e (20) (push) Has been cancelled
/ test-e2e (22) (push) Has been cancelled
/ test-e2e (24) (push) Has been cancelled
/ test-runtimes (bun, 1.x) (push) Has been cancelled
/ test-runtimes (deno, v2.x) (push) Has been cancelled
Publish Any Commit / pkg-publish (push) Has been cancelled
Release / Version (push) Has been cancelled
Release / Publish (push) Has been cancelled
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b65426158e
commit
6032170087
1 changed files with 1310 additions and 104 deletions
|
|
@ -15,6 +15,7 @@ import type {
|
|||
JSONRPCMessage,
|
||||
MessageExtraInfo,
|
||||
RequestId,
|
||||
ScopeChallengeHandler,
|
||||
Transport,
|
||||
WebStandardStreamableHTTPServerTransportOptions
|
||||
} from '@modelcontextprotocol/server';
|
||||
|
|
@ -169,6 +170,11 @@ export class NodeStreamableHTTPServerTransport implements Transport {
|
|||
this._webStandardTransport.setSupportedProtocolVersions(versions);
|
||||
}
|
||||
|
||||
/** Sets the scope challenge resolver used by the wrapped Web Standard transport. */
|
||||
setScopeChallengeResolver(resolver: ScopeChallengeHandler): void {
|
||||
this._webStandardTransport.setScopeChallengeResolver(resolver);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles an incoming HTTP request, whether `GET` or `POST`.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue