Bind a worker's name and labels into its token; list and revoke tokens by jti

This commit is contained in:
2026-10-07 08:42:14 +02:00
parent 9ef7f90dd8
commit 953a983919
16 changed files with 470 additions and 38 deletions
+2 -3
View File
@@ -17,8 +17,7 @@ from pydantic import BaseModel
from sqlmodel import Session
from starlette.concurrency import run_in_threadpool
from fluksio.api.deps import user_from_token
from fluksio.core import security
from fluksio.api.deps import user_from_token, worker_claims
from fluksio.core.config import settings
from fluksio.core.db import engine
from fluksio.flow.artifacts import ArtifactStore
@@ -42,7 +41,7 @@ def artifact_caller(request: Request) -> str:
if not token:
raise HTTPException(status_code=401, detail="Not authenticated")
try:
claims = security.decode_worker_token(token)
claims = worker_claims(token)
except InvalidTokenError:
pass
else: