User
User คือบุคคลที่ยืนยันตัวตนภายในแอปพลิเคชันได้ และเข้าถึงบัญชีต่าง ๆ ผ่านสมาชิกภาพ
สคีมา
interface User {
id: string; // "uid..." - ตัวระบุที่ไม่ซ้ำ
application_id: string; // แอปพลิเคชันเจ้าของ
status: UserStatus;
}
type UserStatus = "active" | "suspended" | "disabled" | "deleted";
คุณสมบัติ
| Property |
Type |
คำอธิบาย |
id |
string |
KSUID ที่ขึ้นต้นด้วย uid |
application_id |
string |
แอปพลิเคชันที่เป็นเจ้าของผู้ใช้ |
status |
enum |
สถานะปัจจุบันของผู้ใช้ |
ค่าสถานะ
| Status |
คำอธิบาย |
active |
ยืนยันตัวตนและเข้าถึงทรัพยากรได้ |
suspended |
ถูกบล็อกการเข้าถึงชั่วคราว |
disabled |
ถูก deprovision หรือปิดใช้งาน |
deleted |
ถูกลบถาวร |
ทรัพยากรที่เกี่ยวข้อง
┌─────────────────────────────────────┐
│ User │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ Identity │ │ Credentials │ │
│ └─────────────┘ └─────────────┘ │
│ ┌─────────────────────────────┐ │
│ │ Memberships │ │
│ └─────────────────────────────┘ │
└─────────────────────────────────────┘
| Resource |
ความสัมพันธ์ |
| Identity |
1:1 - ข้อมูลโปรไฟล์ (PII) |
| Credentials |
1:N - ชุดอีเมล/รหัสผ่าน |
| Memberships |
1:N - ความเชื่อมโยงกับบัญชี |
ตัวอย่าง
{
"id": "uid_2kHfPZcN9xW4mE8RtY7vB",
"application_id": "app_root",
"status": "active"
}
ที่เกี่ยวข้อง