(&self, name: &str)
| 507 | } |
| 508 | |
| 509 | pub fn start_mcp_auth(&self, name: &str) -> anyhow::Result<McpAuthStartInfo> { |
| 510 | let url = format!("{}/mcp/{}/auth", self.base_url, name); |
| 511 | let response = self.client.post(&url).send()?; |
| 512 | if !response.status().is_success() { |
| 513 | let status = response.status(); |
| 514 | let text = response.text().unwrap_or_default(); |
| 515 | anyhow::bail!("Failed to start MCP auth `{}`: {} - {}", name, status, text); |
| 516 | } |
| 517 | Ok(response.json::<McpAuthStartInfo>()?) |
| 518 | } |
| 519 | |
| 520 | pub fn authenticate_mcp(&self, name: &str) -> anyhow::Result<McpStatusInfo> { |
| 521 | let url = format!("{}/mcp/{}/auth/authenticate", self.base_url, name); |
no test coverage detected