File size: 636 Bytes
dac1631
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""
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