トークン
要素は、トークンベースの認証が次の 2 つの段階をまとめることを示します。
-
トークンUrl アクセストークンを使用して付与トークンを生成するのに役立ちます。
-
認証 Url は、サーバー側でユーザーのトークンと Id を認証するために使用されます。
可能な場所
- 熱 意/ヘルプ/ zest -仕様ファイル/コンポーネント/">コンポーネント - 熱 意/ヘルプ/ zest -仕様ファイル/認証スキーマ/導入/">認証スキーマ
属性
| お名前 | タイプ | 説明 |
|---|---|---|
| お名前
必須 | 文字列 | トークンの名前。 |
| 可視性 | 文字列 (列数) | 要素を表示して使用できるユーザーを決定します。 可能な値は、 内部, プライベート, パブリック. デフォルト値はパブリックです。 |
子要素
- 熱 意/ヘルプ/ zest -仕様ファイル/説明/">説明 - 熱意 /ヘルプ/ - zest 指定ファイル/認証スキーマ/トークン-url/">トークン-url 必須 - 熱 意/ヘルプ/ zest -指定ファイル/認証スキーマ/認証-url/">認証-url
例
旅行者のリソースでは、我々は使用することを決定しました トークン 認証のため。 したがって、その認証スキーマを 熱 意/ヘルプ/ zest -仕様ファイル/リソース/"> 以下の方法で。
copy
<token name="MyTokenFlow">
<token-url path="https://authorization-server.com/token">
<operation method="post" name="GenerateToken" category="action">
<request-body>
<content>
<encode type="application/json" />
<structure>
<property name="client_id" type="string"/>
<property name="client_secret" type="string"/>
<property name="code" type="string"/>
</structure>
</content>
</request-body>
<response status="200">
<content>
<encode type="application/json" />
<structure name="TokenResponse">
<property name="token" type="string"/>
<property name="api_domain" type="string"/>
<property name="expires_in" type="datetime"/>
</structure>
</content>
</response>
</operation>
</token-url>
<authentication-url path="https://authorization-server.com/token-info">
<operation method="post" name="IntrospectToken" category="action">
<request-body>
<content>
<encode type="text/plain" />
<structure name="Token">
<property name="token" type="string"/>
</structure>
</content>
</request-body>
<response status="200">
<content>
<encode type="application/json" />
<structure-group type="one-of">
<structure name="TokenInfo">
<property name="active" type="boolean" values="true"/>
<property name="scopes" type="string"/>
<property name="client_id" type="string"/>
<property name="expires_at" type="datetime"/>
</structure>
<structure name="ExpiredTokenResponse">
<property name="active" type="boolean" values="false"/>
</structure>
</structure-group>
</content>
</response>
<response status="401">
<content>
<encode type="application/json" />
<structure name="AuthenticationErrorResponse">
<property name="code" type="string" values="INVALID_CLIENT"/>
<property name="message" type="string"/>
<property name="status" type="string" values="error"/>
</structure>
</content>
</response>
</operation>
</authentication-url>
</token>
Last Updated 2026-02-06 15:55:45 +0530 IST
Yes
No
Send your feedback to us
Skip
Submit