k_card/k_phone/lib
Morten V. Christiansen 920d702dea Refactor k_phone (v2) and add component3 Go binary
k_phone:
- filter_proxy.dart: extract _writeProxyHeaders/_forwardHttpRequest helpers,
  removing ~30 lines of duplication; simplify _handleDirectHttp signature
- proxy_service.dart: import portal_html, merge _serveHtml/_serveEnrollHtml →
  _serveHtmlBytes, extract _parseUsername/_parseUsernameAndDisplay helpers,
  remove dead _loadTlsContext stub, use SessionManager.ttlSeconds (872→455 lines)
- portal_html.dart (new): kPortalHtml/kEnrollHtml/kPortalHtmlBytes/kEnrollHtmlBytes
- session_manager.dart: expose ttlSeconds as public constant
- filter_proxy_test.dart: rewritten for v2 — gated HTTP tests now verify Bearer
  token injection to endpoint directly; 24/24 pass
- k_server_client.dart: deleted (dead code)

component3 (Go proxy — first commit of entire directory):
- gated.go: fix IsGated(host,port) — was silently missing host:port entries
- proxy.go: pass port to IsGated in both handleHTTP and handleConnect
- phone.go: add getToken() calling /auth/get-token to avoid unnecessary FIDO2
  card interactions; fix login() JSON field expires_in→ttl_seconds

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 21:04:19 +02:00
..
ctaphid_channel.dart Phase 9: add Component 1 (filter_proxy), tests, session gate, doc update 2026-05-02 20:10:54 +02:00
enrollment_db.dart Phase 9: add Component 1 (filter_proxy), tests, session gate, doc update 2026-05-02 20:10:54 +02:00
fido2_ops.dart Phase 9: add Component 1 (filter_proxy), tests, session gate, doc update 2026-05-02 20:10:54 +02:00
filter_proxy.dart Refactor k_phone (v2) and add component3 Go binary 2026-05-05 21:04:19 +02:00
main.dart Phase 9: add Component 1 (filter_proxy), tests, session gate, doc update 2026-05-02 20:10:54 +02:00
portal_html.dart Refactor k_phone (v2) and add component3 Go binary 2026-05-05 21:04:19 +02:00
proxy_service.dart Refactor k_phone (v2) and add component3 Go binary 2026-05-05 21:04:19 +02:00
session_manager.dart Refactor k_phone (v2) and add component3 Go binary 2026-05-05 21:04:19 +02:00