-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Extract OAuth API #18818
Merged
Merged
Extract OAuth API #18818
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
4ebf4ec
Tmp
benmoriceau 6d8e907
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/con…
benmoriceau d930c98
Extract the Attempt API from the V1 API
benmoriceau 2dba567
Add comments
benmoriceau 7c36975
Move Connection API out of configuration API
benmoriceau 0d87509
format
benmoriceau cf61847
Merge branch 'bmoric/convert-server-to-micronaut' of github.com:airby…
benmoriceau 04e9bb2
format
benmoriceau c74db48
Rename to Controller
benmoriceau 433dfe5
Merge branch 'bmoric/convert-server-to-micronaut' of github.com:airby…
benmoriceau 415e0c7
Rename to Controller
benmoriceau 7211da6
Add values to the factory
benmoriceau f503b4c
Change the constructor to use hadler instead of objects needed by the…
benmoriceau 70ce157
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/ext…
benmoriceau 688f812
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/ext…
benmoriceau 2103e7d
Update with new tags.
benmoriceau a5c8522
tmp
benmoriceau c5aee8f
Fix PMD errors
benmoriceau 50fc3ae
Extract DB migrator
benmoriceau 6b11154
Merge branch 'bmoric/extract-connection-api' of github.com:airbytehq/…
benmoriceau 4e8051e
Add something that I forgot
benmoriceau 99d9d4b
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/ext…
benmoriceau aca18c9
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/ext…
benmoriceau 7254ebb
extract destination definition api
benmoriceau 4d748af
restore destination factory initialization
benmoriceau e6a56a2
extract destination definition specification api
benmoriceau 709cdc4
format
benmoriceau aa06c20
Merge branch 'bmoric/extract-db-migration-api' of github.com:airbyteh…
benmoriceau 82360dc
format
benmoriceau 82ccd82
Merge branch 'bmoric/extract-destination-definition-api' of github.co…
benmoriceau 6ecdb17
format
benmoriceau 187c9ea
extract health check api
benmoriceau f6a5e9b
extract jobs api
benmoriceau 8023bc9
fix test
benmoriceau bd206a9
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/ext…
benmoriceau 293c187
format
benmoriceau 89308f5
Merge branch 'master' into bmoric/extract-healt-api
benmoriceau 60fa570
Merge branch 'bmoric/extract-healt-api' of github.com:airbytehq/airby…
benmoriceau 7accc25
Extract logs api
benmoriceau 5151909
Add missing declaration
benmoriceau 0eb77e1
Merge branch 'bmoric/extract-jobs-api' of github.com:airbytehq/airbyt…
benmoriceau ffb770b
Fix build
benmoriceau c3cd08e
Merge branch 'master' into bmoric/extract-healt-api
benmoriceau c65a79b
Merge branch 'bmoric/extract-healt-api' into bmoric/extract-jobs-api
benmoriceau 2142e26
Tmp
benmoriceau 3ed2fee
format and PR comments
benmoriceau cef5c58
Merge branch 'bmoric/extract-jobs-api' of github.com:airbytehq/airbyt…
benmoriceau bfaf6b5
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/ext…
benmoriceau 9b00d89
Extract notification API
benmoriceau 8d07282
Merge branch 'bmoric/extract-jobs-api' of github.com:airbytehq/airbyt…
benmoriceau 4b2361d
Merge branch 'bmoric/extract-logs-api' of github.com:airbytehq/airbyt…
benmoriceau 23d908a
re-organize tags
benmoriceau 24de278
Extract all Oauth
benmoriceau fa4761d
Fix PMD
benmoriceau c41a1f9
Merge branch 'bmoric/extract-logs-api' of github.com:airbytehq/airbyt…
benmoriceau fabfe7d
Merge branch 'bmoric/extract-notification-api' of github.com:airbyteh…
benmoriceau be863fa
Merge branch 'master' of github.com:airbytehq/airbyte into bmoric/fix…
benmoriceau 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
41 changes: 41 additions & 0 deletions
41
airbyte-server/src/main/java/io/airbyte/server/apis/DestinationOauthApiController.java
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright (c) 2022 Airbyte, Inc., all rights reserved. | ||
*/ | ||
|
||
package io.airbyte.server.apis; | ||
|
||
import io.airbyte.api.generated.DestinationOauthApi; | ||
import io.airbyte.api.model.generated.CompleteDestinationOAuthRequest; | ||
import io.airbyte.api.model.generated.DestinationOauthConsentRequest; | ||
import io.airbyte.api.model.generated.OAuthConsentRead; | ||
import io.airbyte.api.model.generated.SetInstancewideDestinationOauthParamsRequestBody; | ||
import io.airbyte.server.handlers.OAuthHandler; | ||
import java.util.Map; | ||
import javax.ws.rs.Path; | ||
import lombok.AllArgsConstructor; | ||
|
||
@Path("/v1/destination_oauths") | ||
@AllArgsConstructor | ||
public class DestinationOauthApiController implements DestinationOauthApi { | ||
|
||
private final OAuthHandler oAuthHandler; | ||
|
||
@Override | ||
public Map<String, Object> completeDestinationOAuth(final CompleteDestinationOAuthRequest completeDestinationOAuthRequest) { | ||
return ConfigurationApi.execute(() -> oAuthHandler.completeDestinationOAuth(completeDestinationOAuthRequest)); | ||
} | ||
|
||
@Override | ||
public OAuthConsentRead getDestinationOAuthConsent(final DestinationOauthConsentRequest destinationOauthConsentRequest) { | ||
return ConfigurationApi.execute(() -> oAuthHandler.getDestinationOAuthConsent(destinationOauthConsentRequest)); | ||
} | ||
|
||
@Override | ||
public void setInstancewideDestinationOauthParams(final SetInstancewideDestinationOauthParamsRequestBody setInstancewideDestinationOauthParamsRequestBody) { | ||
ConfigurationApi.execute(() -> { | ||
oAuthHandler.setDestinationInstancewideOauthParams(setInstancewideDestinationOauthParamsRequestBody); | ||
return null; | ||
}); | ||
} | ||
|
||
} |
Oops, something went wrong.
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.
Double checking that
oauths
should be plural in the path.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.
yep, it comes from the generated file: