-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🎉 Source SurveyMonkey: add OAuth support #7433
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ | |
"documentationUrl": "https://docs.airbyte.io/integrations/sources/surveymonkey", | ||
"connectionSpecification": { | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "PostHog Spec", | ||
"title": "SurveyMonkey Spec", | ||
"type": "object", | ||
"required": ["start_date", "access_token"], | ||
"additionalProperties": false, | ||
"required": ["start_date"], | ||
"additionalProperties": true, | ||
"properties": { | ||
"start_date": { | ||
"title": "Start Date", | ||
|
@@ -14,11 +14,77 @@ | |
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z?$", | ||
"examples": ["2021-01-01T00:00:00Z"] | ||
}, | ||
"access_token": { | ||
"type": "string", | ||
"airbyte_secret": true, | ||
"description": "API Token. See the <a href=\"https://docs.airbyte.io/integrations/sources/surveymonkey\">docs</a> for information on how to generate this key." | ||
"credentials": { | ||
"type": "object", | ||
"title": "Authentication Type", | ||
"oneOf": [ | ||
{ | ||
"title": "Authenticate via OAuth", | ||
"type": "object", | ||
"required": [ | ||
"client_id", | ||
"client_secret", | ||
"access_token", | ||
"auth_type" | ||
], | ||
"properties": { | ||
"auth_type": { | ||
"type": "string", | ||
"const": "OAuth", | ||
"enum": ["OAuth"], | ||
"default": "OAuth", | ||
"order": 0 | ||
}, | ||
"client_id": { | ||
"title": "Client ID", | ||
"type": "string", | ||
"description": "The Client ID of your developer application", | ||
"airbyte_secret": true | ||
}, | ||
"client_secret": { | ||
"title": "Client Secret", | ||
"type": "string", | ||
"description": "The client secret of your developer application", | ||
"airbyte_secret": true | ||
}, | ||
"access_token": { | ||
"title": "Access Token", | ||
"type": "string", | ||
"description": "An access token generated using the above client ID and secret", | ||
"airbyte_secret": true | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "object", | ||
"title": "Token Authentication", | ||
"additionalProperties": false, | ||
"required": ["access_token", "auth_type"], | ||
"properties": { | ||
"auth_type": { | ||
"type": "string", | ||
"const": "Token", | ||
"enum": ["Token"], | ||
"default": "Token", | ||
"order": 0 | ||
}, | ||
"access_token": { | ||
"type": "string", | ||
"airbyte_secret": true, | ||
"description": "API Token. See the <a href=\"https://docs.airbyte.io/integrations/sources/surveymonkey\">docs</a> for information on how to generate this key." | ||
} | ||
} | ||
} | ||
] | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you're missing the authspecification node in the spec. |
||
} | ||
}, | ||
"authSpecification": { | ||
"auth_type": "oauth2.0", | ||
"oauth2Specification": { | ||
"rootObject": ["credentials", 0], | ||
"oauthFlowInitParameters": [["client_id"], ["client_secret"]], | ||
"oauthFlowOutputParameters": [["access_token"]] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems incorrect because we're not using the client ID and refresh token anywhere, could you provide more info on why that's the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sherifnada the SurveyMonkey does not provide a refresh token, only an access token which never expires. The Oauth2Authenticator class is not used here. In fact, OAuth in SurveyMonkey boils down to obtaining an access token in a different way than in the current implementation, the way of authentication remains the same