MCPcopy
hub / github.com/MetapriseAI/OrgKernel / revoke_identity

Function revoke_identity

src/orgkernel/pyapi/router.py:369–379  ·  view source on GitHub ↗

Permanently revoke an AgentIdentity.

(
    agent_id: str,
    data: AgentIdentityRevoke,
    db: Annotated[AsyncSession, Depends(get_db)],
)

Source from the content-addressed store, hash-verified

367 description="Permanently revoke an AgentIdentity. This cannot be undone.",
368)
369async def revoke_identity(
370 agent_id: str,
371 data: AgentIdentityRevoke,
372 db: Annotated[AsyncSession, Depends(get_db)],
373) -> AgentIdentityOut:
374 """Permanently revoke an AgentIdentity."""
375 svc = AgentIdentityService(db)
376 try:
377 return await svc.revoke(agent_id, data)
378 except ValueError as e:
379 raise HTTPException(status_code=400, detail=str(e))
380
381
382@_identity.get(

Callers

nothing calls this directly

Calls 2

revokeMethod · 0.95

Tested by

no test coverage detected