(
&self,
server_name: &str,
managed: &ManagedServer,
oauth_status: Option<McpOAuthStatus>,
)
| 526 | } |
| 527 | |
| 528 | async fn default_status_for( |
| 529 | &self, |
| 530 | server_name: &str, |
| 531 | managed: &ManagedServer, |
| 532 | oauth_status: Option<McpOAuthStatus>, |
| 533 | ) -> McpServerInfo { |
| 534 | let oauth_required = managed.config.oauth_required(); |
| 535 | let status = if !managed.enabled { |
| 536 | "disabled" |
| 537 | } else if oauth_required && oauth_status != Some(McpOAuthStatus::Authorized) { |
| 538 | "needs_auth" |
| 539 | } else { |
| 540 | "disabled" |
| 541 | }; |
| 542 | |
| 543 | McpServerInfo { |
| 544 | name: server_name.to_string(), |
| 545 | status: status.to_string(), |
| 546 | tools: 0, |
| 547 | resources: 0, |
| 548 | error: None, |
| 549 | oauth_required, |
| 550 | oauth_status, |
| 551 | } |
| 552 | } |
| 553 | } |
| 554 | |
| 555 | impl Default for McpOAuthManager { |
no test coverage detected