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
Some checks failed
AWS Deploy on Push / build (push) Failing after 41s
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user