Skip to content
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

Add API endpoint to get oauth request/consent #5699

Merged
merged 9 commits into from
Aug 31, 2021

Conversation

ChristopheDuong
Copy link
Contributor

@ChristopheDuong ChristopheDuong commented Aug 27, 2021

What

Closes #5639 and #5640

The endpoints in this PR will be leveraged as part of this larger flow
Screen Shot 2021-08-30 at 5 27 25 PM

Recommended reading order

  1. config.yaml
  2. ConfigurationApi.java
  3. anything else

@github-actions github-actions bot added area/api Related to the api area/connectors Connector related issues area/platform issues related to the platform area/documentation Improvements or additions to documentation labels Aug 27, 2021
Comment on lines 2866 to 2873
# OAuth
OAuthConsentRead:
type: object
required:
- consentUrl
properties:
consentUrl:
type: string
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, should the OAuthConsentRead returned with the connector's definition id that was provided as input too?

In that case, we'd have to have a OAuthSourceConsentRead & OAuthDestinationConsentRead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. The UI has access to that information when it receives this response.

Copy link
Contributor

@sherifnada sherifnada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM but we need @jamakase's review. Adding him here.

@@ -1182,6 +1184,52 @@ paths:
$ref: "#/components/responses/NotFoundResponse"
"422":
$ref: "#/components/responses/InvalidInputResponse"
/v1/source_oauths/get_oauth_consent:
post:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it feels like this should be a GET so the server redirects the user directly, but it would break our API convention. With this being a post, the UI would need to redirect the user. NBD I think.

Comment on lines 2866 to 2873
# OAuth
OAuthConsentRead:
type: object
required:
- consentUrl
properties:
consentUrl:
type: string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. The UI has access to that information when it receives this response.

@sherifnada sherifnada merged commit 0d7cdcb into master Aug 31, 2021
@sherifnada sherifnada deleted the chris/oauth-request-api branch August 31, 2021 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Related to the api area/connectors Connector related issues area/documentation Improvements or additions to documentation area/platform issues related to the platform
Projects
None yet
2 participants