認証スキーマ

要素は構造化されたアプローチを提供します。 認証タイプ リソースの不正アクセスから保護するためのセキュリティ対策を実施しています。

可能な場所

  • 熱 意/ヘルプ/ zest -仕様ファイル/リソース/">リソース

子要素

  • 熱意 /ヘルプ/ - zest 仕様ファイル/認証スキーマ/oauth2/">OAuth2 必須 繰り返し - 熱意 /ヘルプ/ - zest 指定ファイル/認証スキーマ/トークン/">トークン 必須 繰り返し

注:

上記の子要素のいずれかが必須です。

例

旅行リソースでは、 ** 熱 意/ヘルプ/ zest -仕様ファイル/認証スキーマ/oauth2/"> ** 認証のため。 したがって、その認証スキーマを 熱 意/ヘルプ/ zest -仕様ファイル/リソース/"> .oauth2 認証は、4 つの段階で構成されます。

  • 認証 Url クライアント Id と可能なスコープを持つ付与トークンを生成します。

  • トークンUrl アクセストークンを使用して付与トークンを生成するのに役立ちます。

  • Urlを更新する 有効期限が切れたらアクセストークンを更新します。

  • 認証 Url は、サーバー側でユーザーのトークンと Id を認証するために使用されます。 上記の詳細を使用して、ここに示すように旅行リソースの認証スキーマを宣言します。

copy

<authentication-schema>
 <oauth2 name="i-am-oauth2">
 <authorization-url path="https://accounts.travel_bureau.com/oauth/v2/auth">
 <operation method="get" name="Authorization Request" category="action">
 <description>To use the Zoho CRM APIs, the users must authenticate the application to make API calls on their behalf with an access token.</description>
 <argument name="scope" location="param">
 <description>Data that your application wants to access. Refer to Scopes for more details.</description>
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string"/>
 </structure>
 </content>
 </argument>
 <argument name="client_id" location="param">
 <description>Client ID(consumer key) that you obtained during client registration.</description>
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string"/>
 </structure>
 </content>
 </argument>
 <argument name="response_type" location="param">
 <description>Enter code.</description>
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string" values="code"/>
 </structure>
 </content>
 </argument>
 <argument name="access_type" location="param">
 <description>Enter access_type as online or offline.</description>
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string" values="offline,online">
 <description>If you want to generate the refresh token, set this value as offline.</description>
 </property>
 </structure>
 </content>
 </argument>
 <argument name="redirect_uri" location="param">
 <description>Callback URL that you specified during client registration.</description>
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string"/>
 </structure>
 </content>
 </argument>
 <response status="302"></response>
 </operation>
 </authorization-url>
 <token-url path="https://accounts.travel_bureau.com/oauth/v2/token">
 <operation method="post" name="Generate Access Token and Refresh Token" category="action">
 <description>OAuth2.0 requests are usually authenticated with an access token, which is passed as bearer token. To use this access token, you need to construct a normal HTTP request and include it in an Authorization header along with the value of Bearer.</description>
 <argument name="grant_type" location="param">
 <description>Enter the value as "authorization_code".</description>
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string" values="authorization_code"/>
 </structure>
 </content>
 </argument>
 <argument name="client_id" location="param">
 <description>Specify client-id obtained from the connected app.</description>
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string"/>
 </structure>
 </content>
 </argument>
 <argument name="client_secret" location="param">
 <description>Specify client-secret obtained from the connected app.</description>
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string"/>
 </structure>
 </content>
 </argument>
 <argument name="code" location="param">
 <description>Enter access_type as online or offline.</description>
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string" values="offline,online">
 <description>Enter the grant token generated from previous step.</description>
 </property>
 </structure>
 </content>
 </argument>
 <argument name="redirect_uri" location="param">
 <description>Specify the Callback URL that you registered during the app registration.</description>
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string"/>
 </structure>
 </content>
 </argument>
 <response status="200">
 <content>
 <encode type="application/json" />
 <structure>
 <property name="access_token" type="string">
 <description>Access token to access ZohoCRM APIs</description>
 </property>
 <property name="refresh_token" type="string">
 <description>Refresh token to obtain new access tokens</description>
 </property>
 <property name="expires_in" type="integer" values="3600">
 <description>Time in seconds after which the access token expires</description>
 </property>
 <property name="api_domain" type="string">
 <description>Domain name of the API. Use this domain in your requests to make API calls to Zoho CRM.</description>
 </property>
 <property name="token_type" type="string" values="Bearer">
 <description>Type of token obtained. "Bearer" indicates this is an access token.</description>
 </property>
 </structure>
 </content>
 </response>
 </operation>
 </token-url>
 <refresh-url path="https://accounts.travel_bureau.com/oauth/v2/token">
 <operation method="post" name="Refresh Access Token" category="action">
 <description>Access tokens expire after an hour of generation. To generate a new access token, use the refresh token you generated earlier.</description>
 <argument name="refresh_token" location="param">
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string" values="authorization_code"/>
 </structure>
 </content>
 </argument>
 <argument name="client_id" location="param">
 <description>Specify client-id obtained from the connected app.</description>
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string"/>
 </structure>
 </content>
 </argument>
 <argument name="client_secret" location="param">
 <description>Specify client-secret obtained from the connected app.</description>
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string"/>
 </structure>
 </content>
 </argument>
 <argument name="grant_type" location="param">
 <content>
 <encode type="text/plain" />
 <structure>
 <property type="string" values="refresh_token"/>
 </structure>
 </content>
 </argument>
 <response status="200">
 <content>
 <encode type="application/json" />
 <structure>
 <property name="access_token" type="string">
 <description>Access token to access ZohoCRM APIs</description>
 </property>
 <property name="expires_in" type="string" values="3600">
 <description>Time in seconds after which the access token expires</description>
 </property>
 <property name="api_domain" type="string">
 <description>Domain name of the API. Use this domain in your requests to make API calls to Zoho CRM.</description>
 </property>
 <property name="token_type" type="string" values="Bearer">
 <description>Type of token obtained. "Bearer" indicates this is an access token.</description>
 </property>
 </structure>
 </content>
 </response>
 </operation>
 </refresh-url>
 <authentication-url path="https://accounts.travel_bureau.com/oauth/user/info">
 <operation method="get" name="Check Access Token" category="action">
 <response status="200">
 <content>
 <encode type="application/json" />
 <structure name="user info">
 <property name="First_Name" type="string" />
 <property name="Last_Name" type="string" />
 <property name="Display_Name" type="string" />
 <property name="ZUID" type="long" />
 <property name="Email" type="string" />
 </structure>
 </content>
 </response>
 </operation>
 </authentication-url>
 </oauth2>
 </authentication-schema>

Last Updated 2026-02-06 15:55:45 +0530 IST