基本認証
基本認証は、アカウントのユーザー名とパスワードを組み合わせて使用し、アプリケーションにアクセスできる認証タイプです。
基本認証の例を表示
{
"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.required | Experience 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"
]
}
}