diff --git a/airbyte-integrations/connectors/source-github/source_github/spec.json b/airbyte-integrations/connectors/source-github/source_github/spec.json index dbf3be04cd32..2062a0017272 100644 --- a/airbyte-integrations/connectors/source-github/source_github/spec.json +++ b/airbyte-integrations/connectors/source-github/source_github/spec.json @@ -17,11 +17,11 @@ "title": "Authenticate via GitHub (OAuth)", "required": ["access_token"], "properties": { - "option_title": { + "auth_type": { "type": "string", - "title": "Credentials Title", - "description": "OAuth Credentials", - "const": "OAuth Credentials" + "const": "oauth2.0", + "enum": ["oauth2.0"], + "default": "oauth2.0" }, "access_token": { "type": "string", @@ -36,11 +36,11 @@ "title": "Authenticate with Personal Access Token", "required": ["personal_access_token"], "properties": { - "option_title": { + "auth_type": { "type": "string", - "title": "Credentials Title", - "description": "PAT Credentials", - "const": "PAT Credentials" + "const": "token", + "enum": ["token"], + "default": "token" }, "personal_access_token": { "type": "string", @@ -85,12 +85,47 @@ } } }, - "authSpecification": { - "auth_type": "oauth2.0", - "oauth2Specification": { - "rootObject": ["credentials", 0], - "oauthFlowInitParameters": [], - "oauthFlowOutputParameters": [["access_token"]] + "advanced_auth": { + "auth_flow_type": "oauth2.0", + "predicate_key": ["credentials", "auth_type"], + "predicate_value": "oauth2.0", + "oauth_config_specification": { + "complete_oauth_output_specification": { + "type": "object", + "additionalProperties": false, + "properties": { + "access_token": { + "type": "string", + "path_in_connector_config": ["credentials", "access_token"] + } + } + }, + "complete_oauth_server_input_specification": { + "type": "object", + "additionalProperties": false, + "properties": { + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + } + } + }, + "complete_oauth_server_output_specification": { + "type": "object", + "additionalProperties": false, + "properties": { + "client_id": { + "type": "string", + "path_in_connector_config": ["credentials", "client_id"] + }, + "client_secret": { + "type": "string", + "path_in_connector_config": ["credentials", "client_secret"] + } + } + } } } }