نظرة عامة
كاسدور مبني على OAuth ويستخدم الرموز كرموز OAuth للمستخدمين.
Access Token and ID Token
In Casdoor, the access_token and id_token are identical. Both tokens contain the same JWT payload with user information and claims. This is a design choice in Casdoor that simplifies token management.
This approach means:
- Both tokens contain the same user information and custom claims
- Both tokens can be used interchangeably for authentication and authorization
- The token format and expiration settings apply to both tokens equally
- You cannot configure separate claims for
access_tokenandid_token
Token Fields
فيما يلي الحقول المتاحة للرمز في كاسدور:
OwnerNameCreatedTimeApplicationOrganizationUserCodeAccessTokenExpireIn(سينتهي الرمز بعد ساعات)Scope(نطاق التفويض)TokenType(مثلاً، نوعBearer)
بعد تسجيل الدخول إلى التطبيق، هناك ثلاث خيارات لتوليد رمز JWT:
JWTJWT-EmptyJWT-CustomJWT-Standard
الخيارات كالتالي: JWT سيولد رمز يحتوي على جميع حقول المستخدم، JWT-Empty سيولد رمز بجميع القيم غير الفارغة للمستخدم، و JWT-Custom سيولد رمز يحتوي على حقول رمز المستخدم المخصصة (يمكنك اختيار السمات في حقول الرمز). JWT-Standard will generate a token with some standard OIDC token fields include email, phone, gender and Address (Address value in other format is not standard).
