aut flow
This commit is contained in:
@@ -86,7 +86,15 @@ class HMACVerificationMiddleware(BaseHTTPMiddleware):
|
||||
|
||||
async def dispatch(self, request: Request, call_next: Callable) -> Any:
|
||||
# Skip verification for public endpoints
|
||||
public_paths = ["/health", "/docs", "/openapi.json", "/api/v1/auth/login", "/api/v1/auth/telegram/start"]
|
||||
public_paths = [
|
||||
"/health",
|
||||
"/docs",
|
||||
"/openapi.json",
|
||||
"/api/v1/auth/login",
|
||||
"/api/v1/auth/telegram/start",
|
||||
"/api/v1/auth/telegram/register",
|
||||
"/api/v1/auth/telegram/authenticate",
|
||||
]
|
||||
if request.url.path in public_paths:
|
||||
return await call_next(request)
|
||||
|
||||
@@ -153,7 +161,15 @@ class JWTAuthenticationMiddleware(BaseHTTPMiddleware):
|
||||
|
||||
async def dispatch(self, request: Request, call_next: Callable) -> Any:
|
||||
# Skip auth for public endpoints
|
||||
public_paths = ["/health", "/docs", "/openapi.json", "/api/v1/auth/login", "/api/v1/auth/telegram/start"]
|
||||
public_paths = [
|
||||
"/health",
|
||||
"/docs",
|
||||
"/openapi.json",
|
||||
"/api/v1/auth/login",
|
||||
"/api/v1/auth/telegram/start",
|
||||
"/api/v1/auth/telegram/register",
|
||||
"/api/v1/auth/telegram/authenticate",
|
||||
]
|
||||
if request.url.path in public_paths:
|
||||
return await call_next(request)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user