hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: HttpClient 4.1.2 can not customize authentication by use the method that mentioned in "HTTP authentication and execution context" section 4.6.
Date Mon, 19 Sep 2011 20:03:03 GMT
On Mon, 2011-09-19 at 21:11 +0800, purking wp wrote:
> When i write some code dealing with unfuddle api, i need use the Http Baisc
> authentication, so i search the HttpClient Document, then i found this:
> 
>    -
> 
>    *ClientContext.TARGET_AUTH_STATE='http.auth.target-scope': *
> AuthState instance
>    representing the actual target authentication state. The value of this
>    attribute set in the local context takes precedence over the default one.
>    -
> 
>    *ClientContext.PROXY_AUTH_STATE='http.auth.proxy-scope': *
> AuthState instance
>    representing the actual proxy authentication state. The value of this
>    attribute set in the local context takes precedence over the default one.
> 
>  Is the means  i can make a HttpContext then set a AuthState object
> with ClientContext.TARGET_AUTH_STATE
> key, then it can override the default one that init in
> DefaultRequestDirector constructor(line 305 ~ 306 in
> DefaultRequestDirector.java)?
> 

...


> Is the AuthState object i set into HttpContext should override the
> default AuthState
> object?
> 

The documentation is unfortunately wrong. One can still modify the auth
state from a protocol interceptor, though. 

Feel free to raise a JIRA for this issue.

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message