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: support for private app #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vantis-zh
Copy link

added supports for private apps who call api through basic auth.

@ryankazokas ryankazokas self-requested a review November 10, 2020 15:51
Copy link
Member

@ryankazokas ryankazokas left a comment

Choose a reason for hiding this comment

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

I think you just need to add some test coverage. Everything else here looks good.

final Response response = invokeResponseCallable(responseCallable);
return handleResponse(response, Status.OK);
}

private Invocation.Builder buildCall(WebTarget webTarget) {
Invocation.Builder builder = webTarget.request(MediaType.APPLICATION_JSON);
if (null != apiKey && null != password) {
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for adding this. Can you add or update a unit test to use this flow so we can get some coverage for regression.

@@ -0,0 +1,62 @@
package com.shopify;
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for testing out generating the authorization header, but is this needed? Can you remove if not? I see that your code does exactly was is described here:
https://shopify.dev/apps/auth/basic-http

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants