Add missing max-age argument to validate endpoint.

This commit is contained in:
2025-12-19 18:34:01 +00:00
parent 5a57e78814
commit 000501b718
+7 -1
View File
@@ -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