Konfigurieren von Authentifizierungsspezifikationen für Selbstbedienungsquellen (Batch-SDK)
Authentifizierungsspezifikationen definieren, wie Adobe Experience Platform-Benutzer eine Verbindung zu Ihrer Quelle herstellen können.
Das authSpec
-Array enthält Informationen zu den Authentifizierungsparametern, die zum Verbinden einer Quelle mit Platform erforderlich sind. Jede beliebige Quelle kann mehrere verschiedene Authentifizierungstypen unterstützen.
Authentifizierungsspezifikationen
Selbstbedienungsquellen (Batch-SDK) unterstützen OAuth 2-Aktualisierungs-Codes und die Standardauthentifizierung. In den folgenden Tabellen finden Sie Anleitungen zur Verwendung eines OAuth 2-Aktualisierungs-Codes und einer einfachen Authentifizierung
OAuth 2-Aktualisierungs-Code
Ein OAuth 2-Aktualisierungs-Code ermöglicht den sicheren Zugriff auf eine Anwendung, indem er ein temporäres Zugriffstoken und ein Aktualisierungstoken generiert. Mit dem Zugriffs-Token können Sie sicher auf Ihre Ressourcen zugreifen, ohne andere Anmeldeinformationen angeben zu müssen, während Sie mit dem Aktualisierungs-Token ein neues Zugriffs-Token generieren können, sobald das Zugriffs-Token abläuft.
{
"name": "OAuth2 Refresh Code",
"type": "OAuth2RefreshCode",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Define auth params required for connecting to generic rest using oauth2 authorization code.",
"properties": {
"authorizationTestUrl": {
"description": "Authorization test url to validate accessToken.",
"type": "string"
},
"clientId": {
"description": "Client id of user account.",
"type": "string"
},
"clientSecret": {
"description": "Client secret of user account.",
"type": "string",
"format": "password"
},
"accessToken": {
"description": "Access Token",
"type": "string",
"format": "password"
},
"refreshToken": {
"description": "Refresh Token",
"type": "string",
"format": "password"
},
"expirationDate": {
"description": "Date of token expiry.",
"type": "string",
"format": "date",
"uiAttributes": {
"hidden": true
}
},
"accessTokenUrl": {
"description": "Access token url to fetch access token.",
"type": "string"
},
"requestParameterOverride": {
"type": "object",
"description": "Specify parameter to override.",
"properties": {
"accessTokenField": {
"description": "Access token field name to override.",
"type": "string"
},
"refreshTokenField": {
"description": "Refresh token field name to override.",
"type": "string"
},
"expireInField": {
"description": "ExpireIn field name to override.",
"type": "string"
},
"authenticationMethod": {
"description": "Authentication method override.",
"type": "string",
"enum": [
"GET",
"POST"
]
},
"clientId": {
"description": "ClientId field name override.",
"type": "string"
},
"clientSecret": {
"description": "ClientSecret field name override.",
"type": "string"
}
}
}
},
"required": [
"accessToken"
]
}
}
authSpec.name
oAuth2-refresh-code
authSpec.type
oAuth2-refresh-code
authSpec.spec
authSpec.spec.$schema
http://json-schema.org/draft-07/schema#
authSpec.spec.type
object
authSpec.spec.properties
authSpec.spec.properties.description
authSpec.spec.properties.type
string
authSpec.spec.properties.clientId
authSpec.spec.properties.clientSecret
authSpec.spec.properties.accessToken
authSpec.spec.properties.refreshToken
authSpec.spec.properties.expirationDate
authSpec.spec.properties.refreshTokenUrl
authSpec.spec.properties.accessTokenUrl
authSpec.spec.properties.requestParameterOverride
authSpec.spec.required
accessToken
Einfache Authentifizierung
Die Standardauthentifizierung ist ein Authentifizierungstyp, mit dem Sie über eine Kombination aus Ihrem Kontonamen und Ihrem Kontokennwort auf Ihre Anwendung zugreifen können.
{
"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
username
Beispiel einer Authentifizierungsspezifikation
Im Folgenden finden Sie ein Beispiel für eine abgeschlossene Authentifizierungsspezifikation unter Verwendung einer MailChimp Members.
"authSpec": [
{
"name": "OAuth2 Refresh Code",
"type": "OAuth2RefreshCode",
"spec": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"description": "Define auth params required for connecting to generic rest using oauth2 authorization code.",
"properties": {
"authorizationTestUrl": {
"description": "Authorization test url to validate accessToken.",
"type": "string"
},
"accessToken": {
"description": "Access Token of mailChimp endpoint.",
"type": "string",
"format": "password"
}
},
"required": [
"accessToken"
]
}
},
{
"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 mailChimp endpoint.",
"type": "string"
},
"password": {
"description": "Password to connect mailChimp endpoint.",
"type": "string",
"format": "password"
}
},
"required": [
"username",
"password"
]
}
}
],
Nächste Schritte
Wenn Ihre Authentifizierungsspezifikationen ausgefüllt sind, können Sie mit der Konfiguration der Quellspezifikationen für die Quelle fortfahren, die Sie in Platform integrieren möchten. Weitere Informationen finden Sie im Dokument Konfigurieren von Quellspezifikationen .