VÒNG ĐỜI TÀI NGUYÊN API

Chuyển trạng thái, hủy và retry

Client tích hợp theo state machine rõ ràng, không phải suy đoán yêu cầu timeout đã được xử lý hay chưa.

01

State machine của yêu cầu ký

created
  → awaiting_approval
  → approved
  → activated
  → signing
  → completed

Terminal/exception states:
rejected · expired · cancelled · provider_unavailable · failed

02

Quy tắc chuyển trạng thái

FromActionToIdempotency
createdRequest approval optionsawaiting_approvalSafe repeat
awaiting_approvalVerify WebAuthn approvalapprovedIdempotent by assertion/challenge
approvedActivate signing authorizationactivatedIdempotency key required
activatedExecute signaturesigning/completedIdempotency key required
created/awaiting_approvalCancelcancelledSafe repeat
any non-terminalExpire by policyexpiredServer controlled

03

Thao tác bất đồng bộ

  • 202 Accepted returns resource URI and retry-after guidance.
  • GET resource supports polling with bounded backoff.
  • Webhook events are at-least-once and must be deduplicated.
  • Cancellation is best-effort after protected execution begins.
  • Partial verification is represented explicitly, never converted to success.