fix: authorize flow management, gate runs, token-gate callbacks, strict tenants
This commit is contained in:
parent
cfcf0e8bd6
commit
94e5e53092
21 changed files with 662 additions and 160 deletions
|
|
@ -20,6 +20,7 @@ def build_envelope(
|
|||
run_id: UUID,
|
||||
callback_base_url: str,
|
||||
continuation_flow_id: UUID | None,
|
||||
callback_token: str,
|
||||
) -> str:
|
||||
return json.dumps(
|
||||
{
|
||||
|
|
@ -27,6 +28,7 @@ def build_envelope(
|
|||
"run_id": str(run_id),
|
||||
"callback_url": callback_base_url.rstrip("/"),
|
||||
"continuation_flow_id": (str(continuation_flow_id) if continuation_flow_id else None),
|
||||
"callback_token": callback_token,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -50,6 +52,7 @@ async def execute_run(
|
|||
session_id: str | None = None,
|
||||
callback_base_url: str,
|
||||
continuation_flow_id: UUID | None = None,
|
||||
callback_token: str = "",
|
||||
) -> FlowRun:
|
||||
"""Run a deployed version to a terminal state (no interrupts).
|
||||
|
||||
|
|
@ -68,6 +71,7 @@ async def execute_run(
|
|||
run_id=run.id,
|
||||
callback_base_url=callback_base_url,
|
||||
continuation_flow_id=continuation_flow_id,
|
||||
callback_token=callback_token,
|
||||
)
|
||||
try:
|
||||
result = await lfx.run_flow(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue