MCPcopy Create free account
hub / github.com/MetapriseAI/OrgKernel / invalidate_token

Function invalidate_token

src/orgkernel/pyapi/router.py:551–561  ·  view source on GitHub ↗

Invalidate a token early with a reason.

(
    token_id: str,
    reason: str,
    db: Annotated[AsyncSession, Depends(get_db)],
)

Source from the content-addressed store, hash-verified

549 description="Invalidate an ExecutionToken early.",
550)
551async def invalidate_token(
552 token_id: str,
553 reason: str,
554 db: Annotated[AsyncSession, Depends(get_db)],
555) -> ExecutionTokenOut:
556 """Invalidate a token early with a reason."""
557 svc = ExecutionTokenService(db)
558 try:
559 return await svc.invalidate(token_id, reason)
560 except ValueError as e:
561 raise HTTPException(status_code=404, detail=str(e))
562
563
564@_token.get(

Callers

nothing calls this directly

Calls 2

invalidateMethod · 0.95

Tested by

no test coverage detected