port-nimara-client-portal/server/api
Matt d45ae31f10 FEAT: Unified Authentication System - Support Both Directus and Keycloak Users
**Problem Solved:**
- File previews failing due to unsupported Directus authentication
- Encrypted OIDC cookies causing JSON parse errors
- Need both Directus and Keycloak users to access same dashboard

**Changes:**
- server/utils/auth.ts: Added Directus token validation alongside OIDC
- server/api/auth/session.ts: Support both auth methods with proper user data
- server/api/auth/logout.ts: Clear appropriate cookies based on auth method

**Authentication Methods Now Supported:**
1. X-tag headers (webhooks/external calls)
2. Directus tokens (existing Directus users)
3. OIDC sessions (Keycloak users, encrypted or plain)

**Result:**
- Both Directus and Keycloak users can access dashboard
- File previews work for all authenticated users
- Proper logout handling for each auth method
- No more JSON parse errors for encrypted OIDC cookies
2025-06-15 17:03:42 +02:00
..
auth FEAT: Unified Authentication System - Support Both Directus and Keycloak Users 2025-06-15 17:03:42 +02:00
debug FIX: Authentication for Keycloak - Phase 1 2025-06-15 16:13:22 +02:00
email KEYCLOAK AUTH FIX: Phase 5 - Final Batch (COMPLETE) 2025-06-15 16:41:36 +02:00
eoi KEYCLOAK AUTH FIX: Phase 5 - Final Batch (COMPLETE) 2025-06-15 16:41:36 +02:00
files KEYCLOAK AUTH FIX: Phase 4b - Additional File Endpoints 2025-06-15 16:34:27 +02:00
create-interest.ts FIX: Authentication for Keycloak - Phase 1 2025-06-15 16:13:22 +02:00
delete-interest.ts FIX: Authentication for Keycloak - Phase 1 2025-06-15 16:13:22 +02:00
eoi-send-to-sales.ts KEYCLOAK AUTH FIX: Phase 3 - Webhook & EOI Endpoints 2025-06-15 16:22:55 +02:00
get-berths.ts KEYCLOAK AUTH FIX: Phase 2 - Core Interest & Berth Endpoints 2025-06-15 16:18:29 +02:00
get-interest-berths.ts KEYCLOAK AUTH FIX: Phase 2 - Core Interest & Berth Endpoints 2025-06-15 16:18:29 +02:00
get-interest-by-id.ts KEYCLOAK AUTH FIX: Phase 2 - Core Interest & Berth Endpoints 2025-06-15 16:18:29 +02:00
get-interests.ts KEYCLOAK AUTH FIX: Phase 2 - Core Interest & Berth Endpoints 2025-06-15 16:18:29 +02:00
health.ts DEBUG: Add comprehensive startup checks and improve OIDC configuration 2025-06-15 14:57:48 +02:00
link-berth-recommendations-to-interest.ts KEYCLOAK AUTH FIX: Phase 2 - Core Interest & Berth Endpoints 2025-06-15 16:18:29 +02:00
link-berths-to-interest.ts KEYCLOAK AUTH FIX: Phase 2 - Core Interest & Berth Endpoints 2025-06-15 16:18:29 +02:00
request-more-info-to-sales.ts KEYCLOAK AUTH FIX: Phase 3 - Webhook & EOI Endpoints 2025-06-15 16:22:55 +02:00
request-more-information.ts KEYCLOAK AUTH FIX: Phase 3 - Webhook & EOI Endpoints 2025-06-15 16:22:55 +02:00
test-eoi-cleanup.ts KEYCLOAK AUTH FIX: Phase 5 - Final Batch (COMPLETE) 2025-06-15 16:41:36 +02:00
unlink-berth-recommendations-from-interest.ts KEYCLOAK AUTH FIX: Phase 2 - Core Interest & Berth Endpoints 2025-06-15 16:18:29 +02:00
unlink-berths-from-interest.ts KEYCLOAK AUTH FIX: Phase 2 - Core Interest & Berth Endpoints 2025-06-15 16:18:29 +02:00
update-interest.ts FIX: Authentication for Keycloak - Phase 1 2025-06-15 16:13:22 +02:00