True if a server uses OAuth (explicitly configured or auto-detected from * a 401/needs-auth state). Remote servers in needs-auth state are treated * as OAuth so the detail panel shows "not authenticated".
(name: string)
| 292 | * a 401/needs-auth state). Remote servers in needs-auth state are treated |
| 293 | * as OAuth so the detail panel shows "not authenticated". */ |
| 294 | isOAuthServer(name: string): boolean { |
| 295 | const cfg = this.configs.get(name) |
| 296 | if (!cfg) return false |
| 297 | if (isOAuthConfig(cfg)) return true |
| 298 | // Auto-detect: a remote server in needs-auth state requires OAuth. |
| 299 | const state = this.states.get(name) |
| 300 | if (state?.status === "needs-auth" && (cfg.type === "http" || cfg.type === "sse")) return true |
| 301 | return false |
| 302 | } |
| 303 | |
| 304 | /** True if a server has persisted OAuth tokens (already authenticated). */ |
| 305 | isAuthenticated(name: string): boolean { |
no test coverage detected