基本認証

基本認証は、アカウントのユーザー名とパスワードを組み合わせて使用し、アプリケーションにアクセスできる認証タイプです。

基本認証の例を表示
{
  "name": "Basic Authentication",
  "type": "BasicAuthentication",
  "spec": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "description": "defines auth params required for connecting to rest service.",
    "properties": {
      "username": {
        "description": "Username to connect rest endpoint.",
        "type": "string"
      },
      "password": {
        "description": "Password to connect rest endpoint.",
        "type": "string",
        "format": "password"
      }
    },
    "required": [
      "username",
      "password"
    ]
  }
}
プロパティ説明
authSpec.nameサポートされている認証タイプの名前を表示します。Basic Authentication
authSpec.typeソースでサポートされている認証のタイプを定義します。BasicAuthentication
authSpec.spec認証のスキーマ、データタイプおよびプロパティに関する情報が含まれます。
authSpec.spec.$schema認証に使用するスキーマを定義します。http://json-schema.org/draft-07/schema#
authSpec.spec.typeスキーマのデータタイプを定義します。object
authSpec.spec.description認証タイプに固有の詳細情報を表示します。
authSpec.spec.properties認証に使用される資格情報に関する情報が含まれます。
authSpec.spec.properties.usernameアプリケーションに関連付けられたアカウントのユーザー名。
authSpec.spec.properties.passwordアプリケーションに関連付けられたアカウントのパスワード。
authSpec.spec.requiredExperience Platformで必須の値として入力する必要があるフィールドを指定します。username

API キー認証

API キー認証は、API キーおよびその他の関連する認証パラメーターをリクエストに提供することで、API にアクセスするための安全な方法です。 特定の API 情報に応じて、リクエストヘッダー、クエリパラメーター、本文の一部として API キーを送信できます。

API キー認証を使用する場合、通常、次のパラメーターが必要です。

パラメータータイプ必須説明
host文字列×リソースの URL。
authKey1文字列API アクセスに必要な最初の認証キー。 通常は、リクエストヘッダーまたはクエリパラメーターで送信されます。
authKey2文字列オプション2 つ目の認証キー。 必要に応じて、このキーは多くの場合、リクエストをさらに検証するために使用されます。
authKeyN文字列オプション必要に応じて使用できる追加の認証変数ですが、API です。
API キー認証の表示
{
  "name": "API Key Authentication",
  "type": "KeyBased",
  "spec": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "description": "Define authentication parameters required for API access",
    "properties": {
      "host": {
        "type": "string",
        "description": "Enter resource URL host path"
      },
      "authKey1": {
        "type": "string",
        "format": "password",
        "title": "Authentication Key 1",
        "description": "Primary authentication key for accessing the API",
        "restAttributes": {
          "headerParamName": "X-Auth-Key1"
        }
      },
      "authKey2": {
        "type": "string",
        "format": "password",
        "title": "Authentication Key 2",
        "description": "Secondary authentication key, if required",
        "restAttributes": {
          "headerParamName": "X-Auth-Key2"
        }
      },
      ..
      ..
      "authKeyN": {
        "type": "string",
        "format": "password",
        "title": "Additional Authentication Key",
        "description": "Additional authentication keys as needed by the API",
        "restAttributes": {
          "headerParamName": "X-Auth-KeyN"
        }
      }
    },
    "required": [
      "authKey1"
    ]
  }
}