tftsr-devops_investigation/src-tauri/src/commands
Shaun Arman fbce897608
Some checks failed
Release / build-macos-arm64 (push) Successful in 5m4s
Release / build-windows-amd64 (push) Has been cancelled
Release / build-linux-amd64 (push) Has been cancelled
Release / build-linux-arm64 (push) Has been cancelled
feat: complete webview cookie extraction implementation
Implement working cookie extraction using Tauri's IPC event system:

**How it works:**
1. Opens embedded browser window for user to login
2. User completes authentication (including SSO)
3. User clicks "Complete Login" button in UI
4. JavaScript injected into webview extracts `document.cookie`
5. Parsed cookies emitted via Tauri event: `tftsr-cookies-extracted`
6. Rust listens for event and receives cookie data
7. Cookies encrypted and stored in database

**Technical implementation:**
- Uses `window.__TAURI__.event.emit()` from injected JavaScript
- Rust listens via `app_handle.listen()` with Listener trait
- 10-second timeout with clear error messages
- Handles empty cookies and JavaScript errors gracefully
- Cross-platform compatible (no platform-specific APIs)

**Cookie limitations:**
- `document.cookie` only exposes non-HttpOnly cookies
- HttpOnly session cookies won't be captured via JavaScript
- For HttpOnly cookies, services must provide API tokens as fallback

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-03 17:31:48 -05:00
..
ai.rs fix: UI visibility issues, export errors, filtering, and audit log enhancement 2026-04-03 08:37:47 -05:00
analysis.rs fix: inline format args for Rust 1.88 clippy compatibility 2026-03-15 13:28:59 -05:00
db.rs fix: UI visibility issues, export errors, filtering, and audit log enhancement 2026-04-03 08:37:47 -05:00
docs.rs fix: implement native DOCX export without pandoc dependency 2026-04-03 12:53:36 -05:00
integrations.rs feat: complete webview cookie extraction implementation 2026-04-03 17:31:48 -05:00
mod.rs feat: initial implementation of TFTSR IT Triage & RCA application 2026-03-14 22:36:25 -05:00
system.rs style: apply cargo fmt formatting 2026-03-15 12:43:46 -05:00