Added PostgreSQL RDS database. Added channels protected endpoints. Added scripts and docker config to run application locally in dev mode.
Some checks failed
AWS Deploy on Push / build (push) Failing after 41s

This commit is contained in:
2025-05-21 14:02:01 -05:00
parent b947ac67f0
commit 489281f3eb
18 changed files with 409 additions and 125 deletions

View File

@@ -1,12 +1,18 @@
from functools import wraps
from typing import Callable
import os
from fastapi import Depends, HTTPException, status
from fastapi.security import OAuth2PasswordBearer
from app.auth.cognito import get_user_from_token
from app.models.auth import CognitoUser
# Use mock auth for local testing if MOCK_AUTH is set
if os.getenv("MOCK_AUTH", "").lower() == "true":
from app.auth.mock_auth import mock_get_user_from_token as get_user_from_token
else:
from app.auth.cognito import get_user_from_token
oauth2_scheme = OAuth2PasswordBearer(
tokenUrl="signin",
scheme_name="Bearer"