-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
GAds oauth demo #5996
GAds oauth demo #5996
Changes from 5 commits
ed77743
300cafd
677f855
3172f77
20e72ca
2bf50cf
154cdcd
2fb4e9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
* MIT License | ||
* | ||
* Copyright (c) 2020 Airbyte | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
package io.airbyte.oauth.google; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
import io.airbyte.config.persistence.ConfigRepository; | ||
|
||
public class GoogleAdsOauthFlow extends GoogleOAuthFlow { | ||
|
||
public GoogleAdsOauthFlow(ConfigRepository configRepository) { | ||
super(configRepository, "https://www.googleapis.com/auth/adwords"); | ||
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. Btw the GoogleAnalytics scope URL is encoded as 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 introduce some additional code to handle these in #6018 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. good idea. done |
||
} | ||
|
||
@Override | ||
protected String getClientIdUnsafe(JsonNode config) { | ||
// the config object containing client ID and secret is nested inside the "credentials" object | ||
return super.getClientIdUnsafe(config.get("credentials")); | ||
} | ||
|
||
@Override | ||
protected String getClientSecretUnsafe(JsonNode config) { | ||
// the config object containing client ID and secret is nested inside the "credentials" object | ||
return super.getClientSecretUnsafe(config.get("credentials")); | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,35 @@ | ||||||
/* | ||||||
* MIT License | ||||||
* | ||||||
* Copyright (c) 2020 Airbyte | ||||||
* | ||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||||||
* of this software and associated documentation files (the "Software"), to deal | ||||||
* in the Software without restriction, including without limitation the rights | ||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||||
* copies of the Software, and to permit persons to whom the Software is | ||||||
* furnished to do so, subject to the following conditions: | ||||||
* | ||||||
* The above copyright notice and this permission notice shall be included in all | ||||||
* copies or substantial portions of the Software. | ||||||
* | ||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||||
* SOFTWARE. | ||||||
*/ | ||||||
|
||||||
package io.airbyte.oauth.google; | ||||||
|
||||||
import io.airbyte.config.persistence.ConfigRepository; | ||||||
|
||||||
public class GoogleAnalyticsOauthFlow extends GoogleOAuthFlow { | ||||||
|
||||||
public GoogleAnalyticsOauthFlow(ConfigRepository configRepository) { | ||||||
super(configRepository, "https%3A//www.googleapis.com/auth/analytics.readonly"); | ||||||
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.
Suggested change
|
||||||
} | ||||||
|
||||||
} |
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.
these were just moved for grouping with other oauth endpoints. no actual changes happened here.