Accountmaker Docs
功能

應用程式

Application → Account 交替層級中的服務邊界與使用者命名空間。

applications hierarchy isolation permissions

應用程式

應用程式定義服務邊界使用者命名空間。所有使用者、Client 與商戶都屬於某個應用程式。帳戶位於應用程式之下,代表計費與團隊邊界。

層級交替:

Application → Account → Application → Account

也就是說每個應用程式都有自己的使用者命名空間,同一個 email 可以在不同應用程式中存在而不衝突。

為什麼重要

  • 使用者建立發生在目標帳戶的父應用程式中。
  • Access token 會攜帶應用程式與帳戶的上下文,不包含獨立的 namespace claim。
  • 隔離由應用程式邊界與帳戶成員關係保證。

層級範例

app_platform
  └─ acc_alice
       └─ app_taskflow
            └─ acc_bob
  • app_platform 擁有 Alice 使用者。
  • app_taskflow 擁有 Bob 使用者。
  • acc_bobapp_taskflow 之下計費。

應用程式操作

操作Endpoint說明
建立POST /api/accounts/:account_id/applications在帳戶下建立應用程式
列表GET /api/accounts/:account_id/applications列出帳戶下的應用程式
取得GET /api/applications/:application_id取得應用程式詳細資訊
更新PATCH /api/applications/:application_id更新應用程式設定
刪除DELETE /api/applications/:application_id刪除應用程式

Token Claims

Token 會包含應用程式與帳戶上下文:

{
  "app": "app_root",
  "acc": "acc_child456",
  "uid": "uid_789",
  "role": "member"
}

相關