🔐 Eyescan Auth BFF - Testing Interface

Authentication Status: Checking...

🔑 Authentication

GET /v1/login — Redirect to Keycloak login
GET /v1/logout — Clear cookies and redirect to Keycloak logout
GET /v1/auth-state — Current authentication status and user details

🏠 Room Management

List Rooms
GET /v1/rooms - Query: ownerId (admins only), filter=noOwner (rooms with no owner)
Get Room by ID
GET /v1/rooms/:roomId - Admins: any room; doctors: own or no-owner; patients: Bearer signaling JWT (roomId must match)
Create Room
POST /v1/rooms - Query: name, startTime (ISO), ownerId (admins only; omit for room with no owner), appointmentId
Save Patient Record
POST /v1/patients - Body: roomId, lastName, firstName, birthDate, email
Get Patient Record
GET /v1/patients/:roomId - Admins: any room; doctors: own rooms only
Create Doctor
POST /v1/doctors - Body: username, email, firstName, lastName, prefix (optional)
Check Doctor Email Exists
GET /v1/doctors/exists?email=... - Admins only
Get Doctor Profile
GET /v1/doctors/:doctorId - Admins: any doctor; doctors: own profile only
Save Appointment Token Mapping
POST /v1/rooms/appointment-token-room-mappings - Body: appointmentId, roomId
Update Room
PATCH /v1/rooms/:roomId - Body: name, ownerId, startAt (optional)
Delete Room
DELETE /v1/rooms/:roomId
Start Call
POST /v1/rooms/:roomId/startCall - Body: { "peerId": "string" }

🔑 Token Management

Create Room Token
POST /v1/rooms/:roomId/token - Body: { "type": "doctor" | "patient" }
Redeem Token
POST /v1/rooms/redeem-token/:tokenId - Optional body: voip.ios / voip.android
Refresh Signaling Token
POST /v1/rooms/refresh-signaling-token - Bearer: current (possibly expired) signaling JWT
Token to Room ID
POST /v1/rooms/token-to-room-id/:tokenId - Returns roomId for token (does not redeem)
Appointment to Token ID
POST /v1/rooms/appointment-to-token-id/:appointmentId - Returns tokenId for appointmentId

📋 Response

Ready to test endpoints...