MCPcopy Create free account
hub / github.com/github/copilot-sdk / HandlePendingRequest

Method HandlePendingRequest

go/rpc/zrpc.go:14998–15013  ·  view source on GitHub ↗

HandlePendingRequest resolves a pending MCP OAuth request with a host-provided token or cancellation. The pending request is emitted as mcp.oauth_required with the data necessary to authorize the request. RPC method: session.mcp.oauth.handlePendingRequest. Parameters: Pending MCP OAuth request ID

(ctx context.Context, params *MCPOauthHandlePendingRequest)

Source from the content-addressed store, hash-verified

14996//
14997// Returns: Indicates whether the pending MCP OAuth response was accepted.
14998func (a *MCPOauthAPI) HandlePendingRequest(ctx context.Context, params *MCPOauthHandlePendingRequest) (*MCPOauthHandlePendingResult, error) {
14999 req := map[string]any{"sessionId": a.sessionID}
15000 if params != nil {
15001 req["requestId"] = params.RequestID
15002 req["result"] = params.Result
15003 }
15004 raw, err := a.client.Request(ctx, "session.mcp.oauth.handlePendingRequest", req)
15005 if err != nil {
15006 return nil, err
15007 }
15008 var result MCPOauthHandlePendingResult
15009 if err := json.Unmarshal(raw, &result); err != nil {
15010 return nil, err
15011 }
15012 return &result, nil
15013}
15014
15015// Login starts OAuth authentication for a remote MCP server.
15016//

Callers 1

handleMCPAuthRequestMethod · 0.80

Calls 1

RequestMethod · 0.45

Tested by

no test coverage detected