mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-04-02 04:06:51 +00:00
* refactor(auth): consolidate PUBLIC_MODE and mutation guards into reusable helpers * fix: fix websocket test override
40 lines
627 B
Python
40 lines
627 B
Python
from pydantic import BaseModel
|
|
|
|
|
|
class UserInfo(BaseModel):
|
|
sub: str
|
|
|
|
|
|
class AccessTokenInfo(BaseModel):
|
|
pass
|
|
|
|
|
|
def authenticated():
|
|
return None
|
|
|
|
|
|
def current_user():
|
|
return None
|
|
|
|
|
|
def current_user_optional():
|
|
return None
|
|
|
|
|
|
def current_user_optional_if_public_mode():
|
|
# auth_none means no authentication at all — always public
|
|
return None
|
|
|
|
|
|
def parse_ws_bearer_token(websocket):
|
|
return None, None
|
|
|
|
|
|
async def current_user_ws_optional(websocket):
|
|
return None
|
|
|
|
|
|
async def verify_raw_token(token):
|
|
"""Verify a raw JWT token string (used for query-param auth fallback)."""
|
|
return None
|