(
Path(name): Path<String>,
Json(req): Json<McpAuthCallbackRequest>,
)
| 2609 | } |
| 2610 | |
| 2611 | async 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 | |
| 2625 | async fn mcp_authenticate(Path(name): Path<String>) -> Result<Json<McpStatusInfo>> { |
| 2626 | let manager = get_mcp_oauth_manager(); |
nothing calls this directly
no test coverage detected