Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/auth/interface.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
"""Abstract base class for authentication methods."""
"""Abstract base class for all authentication method implementations.

Defines the abstract base class used by all authentication method implementations.
Contract: subclasses must implement `__call__(request: Request) -> AuthTuple`
where `AuthTuple = (UserID, UserName, Token)`.
"""

from abc import ABC, abstractmethod

Expand Down
11 changes: 10 additions & 1 deletion src/auth/noop_with_token.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
"""Manage authentication flow for FastAPI endpoints with no-op auth."""
"""Manage authentication flow for FastAPI endpoints with no-op auth and provided user token.

Intended for local/dev use only — do not use in production.

Behavior:
- Reads a user token from request headers via `auth.utils.extract_user_token`.
- Reads `user_id` from query params (falls back to `DEFAULT_USER_UID`) and
pairs it with `DEFAULT_USER_NAME`.
- Returns a tuple: (user_id, DEFAULT_USER_NAME, user_token).
"""

import logging

Expand Down