(Path(name): Path<String>)
| 2589 | } |
| 2590 | |
| 2591 | async fn start_mcp_auth(Path(name): Path<String>) -> Result<Json<serde_json::Value>> { |
| 2592 | let manager = get_mcp_oauth_manager(); |
| 2593 | ensure_mcp_server_registered(manager, &name).await?; |
| 2594 | let state = manager |
| 2595 | .start_oauth(&name) |
| 2596 | .await |
| 2597 | .map_err(mcp_error_to_api_error)?; |
| 2598 | |
| 2599 | Ok(Json(serde_json::json!({ |
| 2600 | "authorization_url": state.authorization_url, |
| 2601 | "client_id": state.client_id, |
| 2602 | "status": state.status |
| 2603 | }))) |
| 2604 | } |
| 2605 | |
| 2606 | #[derive(Debug, Deserialize)] |
| 2607 | pub struct McpAuthCallbackRequest { |
nothing calls this directly
no test coverage detected