You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Alexandre (JIRA)" <ji...@apache.org> on 2015/05/23 16:35:17 UTC
[jira] [Comment Edited] (HTTPCLIENT-1650) Fluent Executor doesn't
inherit auth scheme and creds provider of HttpClient instance
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14557363#comment-14557363 ]
Alexandre edited comment on HTTPCLIENT-1650 at 5/23/15 2:34 PM:
----------------------------------------------------------------
Yes, you are right that only the scheme will be inherited but that the creds provider will not. I added the source code in question to the issue.
Could I do something like this in 4.4?
Executor
.newInstance(defaultWinHttpClient)
.auth(CurrentWindowsCredentials.INSTANCE)
.execute(Request.Get(...))
was (Author: plalx):
Yes, you are right that only the scheme will still be inherited but that the creds provider will not. I added the source code in question to the issue.
Could I do something like this in 4.4?
Executor
.newInstance(defaultWinHttpClient)
.auth(CurrentWindowsCredentials.INSTANCE)
.execute(Request.Get(...))
> Fluent Executor doesn't inherit auth scheme and creds provider of HttpClient instance
> -------------------------------------------------------------------------------------
>
> Key: HTTPCLIENT-1650
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1650
> Project: HttpComponents HttpClient
> Issue Type: Improvement
> Components: Fluent HC
> Affects Versions: 4.4.1
> Environment: Windows Server 2008
> Reporter: Alexandre
> Labels: flexibility
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> When instantiating an Executor from an existing HttpClient instance, the Executor doesn't inherit the credentials provider.
> Executor(final HttpClient httpclient) {
> super();
> this.httpclient = httpclient;
> this.credentialsProvider = new BasicCredentialsProvider();
> this.authCache = new BasicAuthCache();
> }
> For instance, to perform an HTTP request using the Windows integrated authentication, the following will correctly authenticate:
> WinHttpClients.createDefault().execute(new HttpGet(...));
> But this will not:
> Executor.newInstance(defaultWinHttpClient).execute(Request.Get(...))
> I think that this behavior is very counter-intuitive and limiting at the same time. When an Executor is instantiated from an HttpClient instance, all configurations from that instance should be taken in account.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org