amkyawdev's picture
Initial commit - AmkyawDev Coder Backend
dac1631 verified
Raw
History Blame Contribute Delete
636 Bytes
"""
Authentication Middleware
"""
from fastapi import Request, HTTPException
from starlette.middleware.base import BaseHTTPMiddleware
from src.api.core.logger import logger
class AuthMiddleware(BaseHTTPMiddleware):
"""Simple authentication middleware"""
async def dispatch(self, request: Request, call_next):
# Skip auth for health endpoints
if request.url.path in ["/", "/api/health"]:
return await call_next(request)
# TODO: Implement Firebase auth token verification
# For now, allow all requests
response = await call_next(request)
return response