9.2
  1. 認証

ベアラートークン認証

日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

Sitecoreは、CE Connectを経由せず、Commerce Engineを直接呼び出すシステムに対してベアラートークン認証を使用します。呼び出し者はSitecoreの認証情報を使い、Sitecoreのアイデンティティサーバーに接続してトークンを取得しなければなりません。Sitecoreはリクエストヘッダーの認証ベアラーとしてそのトークンを使用します。

Commerce Engineのconfig.jsonファイルのSitecoreIdentityServerUrlパラメータで、Sitecore IdentityサーバーのURLを指定する必要があります。

Sitecore Identityサーバーは、トークン取得のための以下の2つのエンドポイントを提供します:

  • GetToken (http://{{SitecoreIdentityServerHost}}/connect/token)

    UIからログインせずにトークンを取得できるサイレントモード。Postman、Console、Deploymentスクリプトで使用。

  • Authorize (http://{{SitecoreIdentityServerHost}}/connect/authorize)

    Sitecore Identity Serverのログインページを読み込みます。ユーザーがSitecore認証情報で正常にログインすると、ユーザーは自分のウェブサイトに戻ります。Commerce Business Toolsで使用されます。

Commerce Engineを呼び出すシステムの識別(例

、Commerce Business Tools)はSitecore.Commerce.IdentityServer.Host.xml設定ファイルに保存されなければなりません。XML設定ファイルのデフォルト位置はC:\inetpub\wwwroot\\Config\production\Sitecore.Commerce.IdentityServer.Host.xmlです。

以下は、Sitecore Identity ServerのSitecore.Commerce.IdentityServer.Host.xmlファイルにおけるPostmanクライアント構成のサンプルです。

postman-api Postman API 0 true false 3600 3600 true false false password {AllowedCorsOrigin}/oauth2/callback {AllowedCorsOrigin} https://www.getpostman.com openid EngineAPI postman\_api true

以下は、Commerce Business ToolsのSitecore.Commerce.IdentityServer.Host.xmlにおけるクライアント構成の一例です:

CommerceBusinessTools CommerceBusinessTools 0 true false 3600 3600 true false false implicit {AllowedCorsOrigin} {AllowedCorsOrigin} http://localhost:4200|https://localhost:4200|http://localhost:5005|https://localhost:5005 openid dataEventRecords dataeventrecordsscope securedFiles securedfilesscope role EngineAPI true
この記事を改善するための提案がある場合は、 お知らせください!