Allow specifying multiple permissions.

This commit is contained in:
LeoVasanko committed 2025-08-31 04:47:38 +00:00
1 parent c67a83abdc
commit c06b7ddf26
3 files changed
+12 -11

No files matched your search

+2 -2
View File
@@ -44,12 +44,12 @@ def register_api_routes(app: FastAPI):
@app.post("/auth/validate")
async def validate_token(
response: Response, perm: str | None = None, auth=Cookie(None)
response: Response, perm: list[str] | None = None, auth=Cookie(None)
):
"""Lightweight token validation endpoint.
Query Params:
- perm: optional permission ID the caller must possess
- perm: repeated permission IDs the caller must possess (ALL required)
"""
s = await authz.verify(auth, perm)