Spaces:
Sleeping
Sleeping
Download app/infra/auth.py from bichnhan2701/NoteServicesAPI: direct link, hf CLI and curl.
- Browser
- Download file 243 Bytes
-
https://huggingface.co/spaces/bichnhan2701/NoteServicesAPI/resolve/main/app/infra/auth.py
- Command line
-
hf download hf://spaces/bichnhan2701/NoteServicesAPI/app/infra/auth.py
-
curl -L -o auth.py https://huggingface.co/spaces/bichnhan2701/NoteServicesAPI/resolve/main/app/infra/auth.py
243 Bytes
| from fastapi import Request | |
| def get_current_user_id(request: Request) -> str | None: | |
| """ | |
| Placeholder for auth context. | |
| Later: | |
| - Extract from JWT | |
| - Or API Gateway headers | |
| """ | |
| return request.headers.get("x-user-id") | |