이 페이지에서: 배달 요청의 토큰 요청 페이로드, 자격 증명 경로, 토큰 추출 및 토큰 위치를 포함하여 Adobe Journey Optimizer에서 사용자 지정 채널에 대해 OAuth 2.0 인증을 구성하는 방법에 대해 알아봅니다.
사용자 지정 채널을 만드는 중 OAuth 2.0 을(를) 인증 유형으로 선택한 경우, Adobe Journey Optimizer이 인증 서버에서 액세스 토큰을 검색하는 데 사용하는 토큰 요청을 구성하십시오.
Journey Optimizer이 endpoint, method, request 및 policy 구성을 사용하여 토큰 요청을 보냅니다. 그런 다음 tokenPath을(를) 사용하여 응답에서 액세스 토큰을 추출하고 locationConfig을(를) 사용하여 게재 요청에 추가합니다.
OAuth 2.0 인증 페이로드는 토큰 끝점에 대한 요청을 구성합니다. 사용자 지정 채널 게재 끝점으로 전송된 메시지 페이로드와(과) 별개입니다.
토큰 요청 구성 token-request
다음 예를 사용하여 토큰 요청을 구성합니다. 예제 끝점 및 자격 증명 값을 인증 서버에 필요한 값으로 바꿉니다. 예제의 headers 및 queryParams 항목은 선택 사항입니다. 토큰 끝점에 필요하지 않은 경우 제거하고 credentialPaths에서 일치하는 항목을 제거하십시오.
양식 본문 예 form-body-example
토큰 끝점에 grant_type, client_id 또는 client_secret과(와) 같은 양식 필드가 필요한 경우 form 페이로드를 사용합니다.
{
"type": "oauth2",
"endpoint": {
"uri": "https://auth.example.com/oauth/token"
},
"method": "post",
"request": {
"headers": [
{
"key": "sampleHeaderKey",
"value": "sampleHeaderValue"
}
],
"queryParams": [
{
"key": "sampleQueryParamKey",
"value": "sampleQueryParamValue"
}
],
"payload": {
"type": "form",
"content": [
{
"key": "grant_type",
"value": "client_credentials"
},
{
"key": "client_id",
"value": "your-client-id"
},
{
"key": "client_secret",
"value": "your-client-secret"
}
],
"includeNullValues": false
}
},
"response": {
"type": "json"
},
"policy": {
"timeoutInMilliseconds": 30000,
"cache": {
"enabled": true,
"ttlInSeconds": 300
},
"retry": {
"enabled": false,
"maxRetryCount": 3
}
},
"credentialPaths": [
"header.sampleHeaderKey",
"queryParam.sampleQueryParamKey",
"payload.client_id",
"payload.client_secret"
],
"tokenPath": "access_token",
"locationConfig": {
"key": "Authorization",
"location": "header"
}
}
form 페이로드의 경우 각 자격 증명 경로는 양식 필드 키(예: payload.client_secret)를 사용합니다. 자격 증명 경로에 content 또는 배열 인덱스를 포함하지 마십시오.
JSON 본문 예 json-body-example
토큰 끝점에 JSON 요청 본문이 필요한 경우 json 페이로드를 사용합니다.
{
"type": "oauth2",
"endpoint": {
"uri": "https://auth.example.com/oauth/token"
},
"method": "post",
"request": {
"headers": [
{
"key": "sampleHeaderKey",
"value": "sampleHeaderValue"
}
],
"queryParams": [
{
"key": "sampleQueryParamKey",
"value": "sampleQueryParamValue"
}
],
"payload": {
"type": "json",
"content": {
"grant_type": "client_credentials",
"client_id": "your-client-id",
"client_secret": "your-client-secret"
},
"includeNullValues": false
}
},
"response": {
"type": "json"
},
"policy": {
"timeoutInMilliseconds": 30000,
"cache": {
"enabled": true,
"ttlInSeconds": 300
},
"retry": {
"enabled": false,
"maxRetryCount": 3
}
},
"credentialPaths": [
"header.sampleHeaderKey",
"queryParam.sampleQueryParamKey",
"payload.client_id",
"payload.client_secret"
],
"tokenPath": "access_token",
"locationConfig": {
"key": "Authorization",
"location": "header"
}
}
OAuth 2.0 필드 oauth2-fields
typeoauth2이어야 합니다.endpoint.urimethodpost 사용request.headersrequest.queryParamsrequest.payloadform 및 json 페이로드를 지원합니다.request.payload.includeNullValuesresponse.typejson을(를) 사용합니다.policy.timeoutInMillisecondspolicy.cachepolicy.retrycredentialPathstokenPathaccess_token 또는 data.access_token).locationConfiglocationConfig.keyAuthorization).locationConfig.locationheader 또는 queryParam.토큰 캐싱이 활성화되면 Journey Optimizer은 모든 게재 요청에 대해 토큰 엔드포인트를 호출하는 대신 구성된 캐시 지속 시간 동안 OAuth 토큰을 재사용합니다.
자격 증명 필드 식별 credential-paths
자격 증명이 포함된 요청 필드를 식별하려면 credentialPaths을(를) 사용하십시오. 헤더 또는 쿼리 매개 변수에 자격 증명이 포함된 경우 해당 경로와 요청 본문에 모든 자격 증명 경로를 포함하십시오. 위의 예는 샘플 헤더 및 쿼리 매개 변수 값을 자격 증명으로 식별합니다. 요청과 일치하도록 이 목록을 조정하십시오.
header.header.sampleHeaderKeyqueryParam.queryParam.sampleQueryParamKeypayload.payload.client_secret다음 규칙을 적용합니다.
- 경로는
header,queryParam또는payload(으)로 시작하고 점을 구분 기호로 사용해야 합니다. form페이로드의 경우payload.<formFieldKey>을(를) 사용합니다.json페이로드의 경우payload.client_id또는payload.credentials.client_secret과(와) 같은 JSON 개체 경로를 사용하십시오. 경로에content을(를) 포함하지 마십시오.- 빈 경로 세그먼트는 지원되지 않습니다. 예를 들어
payload..client_id은(는) 잘못되었습니다.
중첩된 JSON 본문의 경우 다음 구성에 표시된 대로 점 표기법을 사용합니다.
{
"request": {
"payload": {
"type": "json",
"content": {
"credentials": {
"client_id": "your-client-id",
"client_secret": "your-client-secret"
}
},
"includeNullValues": false
}
},
"credentialPaths": [
"payload.credentials.client_id",
"payload.credentials.client_secret"
]
}
액세스 토큰 추출 token-path
tokenPath은(는) OAuth 2.0 토큰 응답에서 액세스 토큰이 있는 위치를 정의합니다.
다음 응답의 경우 tokenPath을(를) access_token(으)로 설정하십시오.
{
"access_token": "example-access-token",
"token_type": "Bearer",
"expires_in": 3600
}
중첩된 응답의 경우 tokenPath을(를) data.access_token(으)로 설정합니다.
{
"data": {
"access_token": "example-access-token"
}
}
게재 요청에 토큰 추가 token-location
locationConfig은(는) 사용자 지정 채널 게재 끝점을 호출할 때 Journey Optimizer에서 검색된 토큰을 추가하는 위치를 정의합니다.
Authorization 헤더에서 토큰을 보내려면 다음을 사용합니다.
{
"locationConfig": {
"key": "Authorization",
"location": "header"
}
}
headerqueryParam제한 및 유효성 검사 규칙 limits
endpoint.uripolicy.timeoutInMillisecondspolicy.cache.ttlInSecondsrequest.headersrequest.queryParamsrequest.payload.type=formtokenPathcredentialPathsheader, queryParam 또는 payload(으)로 시작하고 점을 구분 기호로 사용해야 합니다.다음 단계 next-steps
This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.
For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.
- TL;DR: Configure OAuth 2.0 authentication for a custom channel by defining the token endpoint request, identifying credential fields, extracting the access token from the response, and specifying where to add it to delivery requests.
Intents:
- Configure OAuth 2.0 authentication when creating a custom channel or managing API credentials
- Choose a form or JSON body for the token endpoint request
- Identify credential fields in headers, query parameters, and request bodies
- Extract an access token from a top-level or nested response field
- Add the retrieved token to a delivery request header or query parameter
- Understand token caching and authentication configuration limits
Glossary:
- Token endpoint: The authorization server endpoint that Journey Optimizer calls to retrieve an access token
- Authentication payload: The configuration of the OAuth 2.0 token request, separate from the message payload sent to the delivery endpoint (product-specific)
- Credential paths: The paths identifying request fields that contain credentials, configured through
credentialPaths(product-specific) - Token path: The dot-separated path to the access token in the token endpoint response, configured through
tokenPath(product-specific) - Token location configuration: The delivery request header or query parameter to which the retrieved token is added, configured through
locationConfig(product-specific)
Guardrails:
- Set the authentication configuration
typetooauth2and usepostfor token requests. - The token endpoint must be an absolute HTTPS URL with a non-empty host and a maximum length of 2048 characters.
- Token request bodies support
formandjsonpayloads; choose the format expected by your authorization server. - Credential paths must start with
header,queryParam, orpayload, use dots as separators, and contain no empty path segments. - Form credential paths use the form field key. JSON credential paths use the JSON object path. Do not include
contentor form array indexes in credential paths. - Supported token locations are
headerandqueryParam. - The token endpoint timeout must be between 300 and 60000 milliseconds.
- When token caching is enabled, the cache duration must be between 300 and 3600 seconds. Journey Optimizer reuses the token for the configured duration instead of retrieving a token for every delivery request.
- Credential values must contain between 1 and 1024 characters.
- An empty
tokenPathis allowed only when the entire response is the token.
Terminology:
- Canonical name: OAuth 2.0 authentication - variants: OAuth 2.0 authentication payload, OAuth token request configuration
- Do not confuse: “authentication payload” (configuration for retrieving an access token) with “message payload” (content sent to the custom channel delivery endpoint)
- Do not confuse:
credentialPaths(credential fields in the token request) withtokenPath(access token field in the token response) - Do not confuse:
request.headersandrequest.queryParams(values sent to the token endpoint) withlocationConfig(where the retrieved token is added to delivery requests)
FAQ:
- Q: When should I use a form or JSON payload? - Use
formwhen the token endpoint expects form fields, andjsonwhen it expects a JSON request body. - Q: How do I identify a client secret in a form body? - Use the form field key, for example,
payload.client_secret, withoutcontentor an array index. - Q: How do I identify credentials in a nested JSON body? - Use dot notation, for example,
payload.credentials.client_secret. - Q: How do I extract a token from a nested response? - Set
tokenPathto the response field path, for example,data.access_token. - Q: Where can Journey Optimizer add the token to delivery requests? - Set
locationConfig.locationtoheaderorqueryParamandlocationConfig.keyto the header or query parameter name. - Q: Does Journey Optimizer retrieve a token for every delivery request? - When caching is enabled, it reuses the token for the configured cache duration.