Skip to content

Conversation

@kedarpanse
Copy link

  1. Added http socket factory in registry as CONNECT method needs it
  2. Added NTCredentials if username contains / or .

Perhaps adding domain in proxyconfig might be better? Not sure which way would you like to go.

2. Added NTCredentials if username contains / or \.  Perhaps adding domain in proxyconfig might be better
String port = proxyConfig.getPort();
if (!host.isEmpty() && !port.isEmpty()) {
CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
if (username.contains("/") || username.contains("\\")) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of adding this check, let's add a new field called domain in the ProxyConfig and if domain is found lets use NTCredentials else use UsernamePasswordCredentials.

@diana-derose
Copy link
Collaborator

@kedarpanse - Yes, lets add domain in ProxyConfig. If you want you can send another pull request, if not i can go ahead and add it and close this one out.

2. Added NTCredentials if domain not empty in HttpRequestClinent
@diana-derose diana-derose merged commit 522213f into intuit:develop Mar 28, 2019
@kedarpanse
Copy link
Author

@diana-derose I see similar code on Config.java HTTPBatchClientConnectionInterceptor and HTTPClientConnectionInterceptor, should I also add domain in Config.java and update these two classes? Not sure where else it needs to be updated. Please advise.

@diana-derose
Copy link
Collaborator

Yes, I'll add it there as well as in the payments SDK.

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