Endpoints: Add key permission checker

This is a definite way to check if an authorized key is API or admin.
The endpoint only runs if the key is valid in the first place to keep
inline with the API's security model.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2024-03-18 00:45:40 -04:00
parent c9a6d9ae1f
commit 3c08f46c51
3 changed files with 51 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
"""Types for auth requests."""
from pydantic import BaseModel
class AuthPermissionResponse(BaseModel):
permission: str