Add username/password login with keyring-backed credential storage

- Dual-mode auth dialog: username/password (default) + API token fallback
- Proxmox ticket-based auth via POST /access/ticket
- OS keyring integration for secure credential persistence
- Auto-open login dialog on launch when unauthenticated
- Auth state tracking with auto-refresh support
This commit is contained in:
Matt
2026-07-29 18:27:27 +00:00
parent 084b64872e
commit dbe3c8d2a1
8 changed files with 477 additions and 152 deletions
+11 -6
View File
@@ -1,20 +1,19 @@
// Connection configuration types
export type AuthMode = 'password' | 'token'
export interface ConnectionConfig {
id: string
name: string
// Primary endpoint
primary: EndpointConfig
// Fallback endpoints for cluster failover
fallbacks: EndpointConfig[]
// Certificate trust
certFingerprint?: string
trusted: boolean
// Connection state
status: ConnectionStatus
// Cluster info (populated after connection)
clusterName?: string
isCluster: boolean
authMode: AuthMode
username?: string
}
export interface EndpointConfig {
@@ -23,7 +22,7 @@ export interface EndpointConfig {
token?: string // API token (stored in keyring, not in config)
}
export type ConnectionStatus =
export type ConnectionStatus =
| 'disconnected'
| 'connecting'
| 'connected'
@@ -43,3 +42,9 @@ export interface ConnectionCredentials {
connectionId: string
apiToken: string
}
export interface LoginResult {
connectionId: string
ticket: string
csrfToken: string
}