From 000501b718c6fc1ca9b4b73fbfcf6616667aac9f Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Fri, 19 Dec 2025 18:34:01 +0000 Subject: [PATCH] Add missing max-age argument to validate endpoint. --- paskia/fastapi/api.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/paskia/fastapi/api.py b/paskia/fastapi/api.py index 6a489ea..835ef07 100644 --- a/paskia/fastapi/api.py +++ b/paskia/fastapi/api.py @@ -77,6 +77,7 @@ async def validate_token( request: Request, response: Response, perm: list[str] = Query([]), + max_age: str | None = Query(None), auth=AUTH_COOKIE, ): """Validate the current session and extend its expiry. @@ -86,7 +87,12 @@ async def validate_token( refresh endpoint. """ try: - ctx = await authz.verify(auth, perm, host=request.headers.get("host")) + ctx = await authz.verify( + auth, + perm, + host=request.headers.get("host"), + max_age=max_age, + ) except HTTPException: # Global handler will clear cookie if 401 raise