Revert "feat: support extending McpServer with authorization"
This commit is contained in:
parent
fbdeb06a41
commit
8027ae1593
2 changed files with 42 additions and 419 deletions
|
|
@ -93,11 +93,6 @@ export type RequestHandlerExtra = {
|
|||
* The session ID from the transport, if available.
|
||||
*/
|
||||
sessionId?: string;
|
||||
|
||||
/**
|
||||
* The authenticated user, if available.
|
||||
*/
|
||||
user?: unknown;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -324,7 +319,6 @@ export abstract class Protocol<
|
|||
const extra: RequestHandlerExtra = {
|
||||
signal: abortController.signal,
|
||||
sessionId: this._transport?.sessionId,
|
||||
user: this._transport?.user,
|
||||
};
|
||||
|
||||
// Starting with Promise.resolve() puts any synchronous errors into the monad as well.
|
||||
|
|
@ -370,7 +364,7 @@ export abstract class Protocol<
|
|||
private _onprogress(notification: ProgressNotification): void {
|
||||
const { progressToken, ...params } = notification.params;
|
||||
const messageId = Number(progressToken);
|
||||
|
||||
|
||||
const handler = this._progressHandlers.get(messageId);
|
||||
if (!handler) {
|
||||
this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(notification)}`));
|
||||
|
|
|
|||
|
|
@ -46,9 +46,4 @@ export interface Transport {
|
|||
* The session ID generated for this connection.
|
||||
*/
|
||||
sessionId?: string;
|
||||
|
||||
/**
|
||||
* The authenticated user for this transport session.
|
||||
*/
|
||||
user?: unknown;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue