From b47f0ca0c14137a29cd7e8b716925970a824f6e1 Mon Sep 17 00:00:00 2001 From: Baz Date: Wed, 27 Nov 2024 23:57:20 +0200 Subject: [PATCH] fix: (DeclarativeOAuthFlow) - add `access_token_params` property to match the actual spec properties (#103) --- .../airbyte_protocol/airbyte_protocol.yaml | 32 +++++++++++++------ .../airbyte_protocol/v0/airbyte_protocol.yaml | 32 +++++++++++++------ 2 files changed, 46 insertions(+), 18 deletions(-) diff --git a/protocol-models/src/main/resources/airbyte_protocol/airbyte_protocol.yaml b/protocol-models/src/main/resources/airbyte_protocol/airbyte_protocol.yaml index ab42754..b345c7c 100644 --- a/protocol-models/src/main/resources/airbyte_protocol/airbyte_protocol.yaml +++ b/protocol-models/src/main/resources/airbyte_protocol/airbyte_protocol.yaml @@ -659,10 +659,9 @@ definitions: description: |- OAuth specific blob. Pertains to the fields defined by the connector relating to the OAuth flow. type: object - additionalProperties: false + additionalProperties: true required: - consent_url - - scope - access_token_url - extract_output properties: @@ -710,6 +709,20 @@ definitions: "Authorization": "Basic {base64Encoder:{client_id}:{client_secret}}" } } + access_token_params: + type: object + additionalProperties: true + description: |- + The OAuth Specific optional query parameters to inject while exchanging the `auth_code` to `access_token` during `completeOAuthFlow` step. + When this property is provided, the query params are encoded as `Json string` and passed to the outgoing API request. + + Examples: + { + "access_token_params": { + "my_query_param": "param_value", + "{client_id_key}": {{client_id_key}} + } + } extract_output: type: array items: @@ -726,22 +739,23 @@ definitions: } state: type: object - additionalProperties: true description: |- The OAuth Specific object to provide the criteria of how the `state` query param should be constructed, including length and complexity. - TODO: review and edit this property, once the state generation logic is finilized. - Examples: { "state": { - "min_length": 7, - "max_length": 128, - "min_special": 3, - "excluded": ["$", "\\", "."] + "min": 7, + "max": 128, } } + additionalProperties: true + properties: + min: + type: integer + max: + type: integer client_id_key: type: string description: |- diff --git a/protocol-models/src/main/resources/airbyte_protocol/v0/airbyte_protocol.yaml b/protocol-models/src/main/resources/airbyte_protocol/v0/airbyte_protocol.yaml index 44b3bab..c8bb18e 100644 --- a/protocol-models/src/main/resources/airbyte_protocol/v0/airbyte_protocol.yaml +++ b/protocol-models/src/main/resources/airbyte_protocol/v0/airbyte_protocol.yaml @@ -714,10 +714,9 @@ definitions: description: |- OAuth specific blob. Pertains to the fields defined by the connector relating to the OAuth flow. type: object - additionalProperties: false + additionalProperties: true required: - consent_url - - scope - access_token_url - extract_output properties: @@ -765,6 +764,20 @@ definitions: "Authorization": "Basic {base64Encoder:{client_id}:{client_secret}}" } } + access_token_params: + type: object + additionalProperties: true + description: |- + The OAuth Specific optional query parameters to inject while exchanging the `auth_code` to `access_token` during `completeOAuthFlow` step. + When this property is provided, the query params are encoded as `Json string` and passed to the outgoing API request. + + Examples: + { + "access_token_params": { + "my_query_param": "param_value", + "{client_id_key}": {{client_id_key}} + } + } extract_output: type: array items: @@ -781,22 +794,23 @@ definitions: } state: type: object - additionalProperties: true description: |- The OAuth Specific object to provide the criteria of how the `state` query param should be constructed, including length and complexity. - TODO: review and edit this property, once the state generation logic is finilized. - Examples: { "state": { - "min_length": 7, - "max_length": 128, - "min_special": 3, - "excluded": ["$", "\\", "."] + "min": 7, + "max": 128, } } + additionalProperties: true + properties: + min: + type: integer + max: + type: integer client_id_key: type: string description: |-