概要
Casdoorは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
Casdoorで利用可能なトークンフィールドは以下の通りです:
OwnerNameCreatedTimeApplicationOrganizationUserCodeAccessTokenExpireIn(トークンの有効期限は時間)Scope(認可の範囲)TokenType(例:Bearerタイプ)
アプリケーションにログインした後、JWTトークンを生成するには3つのオプションがあります:
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).
