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)
| 14996 | // |
| 14997 | // Returns: Indicates whether the pending MCP OAuth response was accepted. |
| 14998 | func (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 | // |
no test coverage detected