first commit

This commit is contained in:
2024-03-26 13:17:04 -04:00
commit de448a35d1
22 changed files with 156 additions and 0 deletions

13
app/dependencies.py Normal file
View File

@@ -0,0 +1,13 @@
from typing import Annotated
from fastapi import Header, HTTPException
async def get_token_header(x_token: Annotated[str, Header()]):
if x_token != "fake-super-secret-token":
raise HTTPException(status_code=400, detail="X-Token header invalid")
async def get_query_token(token: str):
if token != "jessica":
raise HTTPException(status_code=400, detail="No Jessica token provided")