User Log and Persistent Faction Information

This commit is contained in:
2026-01-27 14:48:46 -05:00
parent 4ae3a9eb17
commit 4850c16b87
39 changed files with 782 additions and 71 deletions

View File

@@ -1,11 +1,11 @@
"""Authentication utilities and dependencies."""
#Authentication utilities and dependencies
import jwt
from fastapi import Request, HTTPException
import config as config_module
def get_current_user(request: Request) -> dict:
"""Dependency to check authentication and return user info"""
#Dependency to check authentication and return user info
token = request.cookies.get("auth_token")
if not token:
@@ -21,7 +21,7 @@ def get_current_user(request: Request) -> dict:
def check_auth(request: Request) -> bool:
"""Check if user is authenticated (returns bool, doesn't raise exception)"""
#Check if user is authenticated (returns bool, doesn't raise exception)
token = request.cookies.get("auth_token")
if not token:
return False