MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / mcp_auth_callback

Function mcp_auth_callback

crates/opencode-server/src/routes.rs:2611–2623  ·  view source on GitHub ↗
(
    Path(name): Path<String>,
    Json(req): Json<McpAuthCallbackRequest>,
)

Source from the content-addressed store, hash-verified

2609}
2610
2611async fn mcp_auth_callback(
2612 Path(name): Path<String>,
2613 Json(req): Json<McpAuthCallbackRequest>,
2614) -> Result<Json<McpStatusInfo>> {
2615 let manager = get_mcp_oauth_manager();
2616 ensure_mcp_server_registered(manager, &name).await?;
2617 let server_info = manager
2618 .handle_callback(&name, &req.code)
2619 .await
2620 .map_err(mcp_error_to_api_error)?;
2621
2622 Ok(Json(McpStatusInfo::from(server_info)))
2623}
2624
2625async fn mcp_authenticate(Path(name): Path<String>) -> Result<Json<McpStatusInfo>> {
2626 let manager = get_mcp_oauth_manager();

Callers

nothing calls this directly

Calls 3

get_mcp_oauth_managerFunction · 0.85
handle_callbackMethod · 0.80

Tested by

no test coverage detected