-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Tmp * Extract the Attempt API from the V1 API * Add comments * Move Connection API out of configuration API * format * format * Rename to Controller * Rename to Controller * Add values to the factory * Change the constructor to use hadler instead of objects needed by the handler * Update with new tags. * tmp * Fix PMD errors * Extract DB migrator * Add something that I forgot * extract destination definition api * restore destination factory initialization * extract destination definition specification api * format * format * format * extract health check api * extract jobs api * fix test * format * Extract logs api * Add missing declaration * Fix build * Tmp * format and PR comments * Extract notification API * re-organize tags * Extract all Oauth * Fix PMD
- Loading branch information
1 parent
9c081fb
commit 589f6ef
Showing
12 changed files
with
602 additions
and
384 deletions.
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.