|
Fix WebSocket 403 — bypass FastAPI Depends for WS auth
- websocket.py: resolve user by calling get_current_user_ws directly inside the handler instead of using Depends(). This avoids FastAPI returning HTTP 403 on the upgrade request when auth resolution fails. - websocket.py: accept WebSocket before access check, close with 4003 for auth failures instead of HTTP 403. - auth/deps.py: remove debug logging from get_current_user_ws. - tests/conftest.py: monkeypatch get_current_user_ws directly since Depends() is no longer used on the WebSocket endpoint. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
|---|
|
|
| navi/api/websocket.py |
|---|
| navi/auth/deps.py |
|---|
| tests/integration/conftest.py |
|---|