This commit is contained in:
2024-04-04 16:39:29 -04:00
parent de448a35d1
commit 5d80acfcea
24 changed files with 298 additions and 28 deletions

View File

@@ -1,13 +0,0 @@
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")