OAuth 2.0 인증 구성 custom-channel-oauth2

이 페이지에서: 배달 요청의 토큰 요청 페이로드, 자격 증명 경로, 토큰 추출 및 토큰 위치를 포함하여 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

필드
설명
type
oauth2이어야 합니다.
endpoint.uri
OAuth 2.0 토큰 엔드포인트의 HTTPS URL입니다.
method
토큰 끝점을 호출하는 데 사용되는 HTTP 메서드입니다. 토큰 요청에 post 사용
request.headers
토큰 엔드포인트로 전송되는 선택적 헤더입니다.
request.queryParams
토큰 끝점 URL에 추가된 선택적 쿼리 매개 변수입니다.
request.payload
토큰 요청 본문. form 및 json 페이로드를 지원합니다.
request.payload.includeNullValues
Null 값이 있는 필드를 토큰 요청 본문에 포함할지 여부를 정의합니다.
response.type
응답 형식. 토큰 끝점이 JSON 응답을 반환하는 경우 json을(를) 사용합니다.
policy.timeoutInMilliseconds
토큰 끝점 응답을 기다리는 최대 시간입니다.
policy.cache
OAuth 토큰이 캐시되는지 여부 및 기간 을 정의합니다.
policy.retry
토큰 끝점 실패에 대한 선택적 다시 시도 구성입니다.
credentialPaths
자격 증명이 포함된 요청 필드 경로. 이러한 필드는 자격 증명으로 처리되며 안전하게 관리할 수 있습니다.
tokenPath
OAuth 응답에서 액세스 토큰에 대한 점으로 구분된 경로(예: access_token 또는 data.access_token).
locationConfig
검색된 토큰이 게재 요청에 추가되는 위치를 정의합니다.
locationConfig.key
토큰을 전달하는 헤더 또는 쿼리 매개 변수의 이름(예: Authorization).
locationConfig.location
토큰이 추가된 위치: header 또는 queryParam.

토큰 캐싱이 활성화되면 Journey Optimizer은 모든 게재 요청에 대해 토큰 엔드포인트를 호출하는 대신 구성된 캐시 지속 시간 동안 OAuth 토큰을 재사용합니다.

자격 증명 필드 식별 credential-paths

자격 증명이 포함된 요청 필드를 식별하려면 credentialPaths을(를) 사용하십시오. 헤더 또는 쿼리 매개 변수에 자격 증명이 포함된 경우 해당 경로와 요청 본문에 모든 자격 증명 경로를 포함하십시오. 위의 예는 샘플 헤더 및 쿼리 매개 변수 값을 자격 증명으로 식별합니다. 요청과 일치하도록 이 목록을 조정하십시오.

접두사
다음에 사용됨
예
header.
요청 헤더에 전달된 자격 증명.
header.sampleHeaderKey
queryParam.
쿼리 매개 변수에서 전달된 자격 증명입니다.
queryParam.sampleQueryParamKey
payload.
요청 본문에 전달된 자격 증명입니다.
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"
  }
}
위치
설명
header
토큰을 HTTP 헤더로 추가합니다.
queryParam
토큰을 쿼리 매개 변수로 추가합니다.

제한 및 유효성 검사 규칙 limits

필드
제한
endpoint.uri
은(는) 비어 있지 않은 호스트가 있는 절대 HTTPS URL이어야 합니다. 최대 길이: 2048자.
policy.timeoutInMilliseconds
최소: 300ms. 최대값: 60000ms.
policy.cache.ttlInSeconds
캐시가 활성화된 경우 적용됩니다. 최소: 300초. 최대: 3600초.
request.headers
최대 50개의 헤더입니다. 헤더 키 길이: 1~100자. 헤더 값 최대: 8192자.
request.queryParams
최대 50개의 쿼리 매개 변수. 쿼리 매개 변수 키 길이: 1~100자. 쿼리 매개 변수 값 최대값: 8192자.
request.payload.type=form
최대 50개의 양식 필드. 양식 키 길이: 1~100자. 중복 양식 키는 허용되지 않습니다.
자격 증명 값
1-1024자.
tokenPath
올바른 점으로 구분된 경로여야 합니다. 빈 값은 전체 응답이 토큰인 경우에만 허용됩니다.
credentialPaths
header, queryParam 또는 payload(으)로 시작하고 점을 구분 기호로 사용해야 합니다.

다음 단계 next-steps

AI Knowledge Reference

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 type to oauth2 and use post for 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 form and json payloads; choose the format expected by your authorization server.
  • Credential paths must start with header, queryParam, or payload, 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 content or form array indexes in credential paths.
  • Supported token locations are header and queryParam.
  • 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 tokenPath is 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) with tokenPath (access token field in the token response)
  • Do not confuse: request.headers and request.queryParams (values sent to the token endpoint) with locationConfig (where the retrieved token is added to delivery requests)

FAQ:

  • Q: When should I use a form or JSON payload? - Use form when the token endpoint expects form fields, and json when 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, without content or 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 tokenPath to the response field path, for example, data.access_token.
  • Q: Where can Journey Optimizer add the token to delivery requests? - Set locationConfig.location to header or queryParam and locationConfig.key to 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.
recommendation-more-help
journey-optimizer-help