使用者
User 是可在應用程式內進行驗證,並透過 memberships 存取帳戶的個體。
Schema
interface User {
id: string; // "uid..." - Unique identifier
application_id: string; // Owning application
status: UserStatus;
}
type UserStatus = "active" | "suspended" | "disabled" | "deleted";
屬性
| 屬性 |
型別 |
說明 |
id |
string |
帶有 uid 前綴的 KSUID |
application_id |
string |
擁有此使用者的 application |
status |
enum |
目前使用者狀態 |
狀態值
| 狀態 |
說明 |
active |
可驗證並存取資源 |
suspended |
暫時禁止存取 |
disabled |
已停用或不啟用 |
deleted |
永久移除 |
相關資源
┌─────────────────────────────────────┐
│ User │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Identity │ │ Credentials │ │
│ └─────────────┘ └─────────────┘ │
│ ┌─────────────────────────────┐ │
│ │ Memberships │ │
│ └─────────────────────────────┘ │
└─────────────────────────────────────┘
| 資源 |
關係 |
| Identity |
1:1 - 個人資料(PII) |
| Credentials |
1:N - Email/password 配對 |
| Memberships |
1:N - 帳戶關聯 |
範例
{
"id": "uid_2kHfPZcN9xW4mE8RtY7vB",
"application_id": "app_root",
"status": "active"
}
相關