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: Clearing the credentials cache in httpclient 4
Date Thu, 16 Jan 2014 22:32:18 GMT
On Thu, 2014-01-16 at 15:16 -0700, Dennis Heimbigner wrote:
> 
> Oleg Kalnichevski wrote:
> > On Thu, 2014-01-16 at 13:21 -0700, Dennis Heimbigner wrote:
> >> As I understand it, in httpclient 4,
> >> each credentials provider is solely responsible
> >> for caching of credentials.
> >>
> > 
> > Actually it is AuthCache [1].
> 
> That does not seem correct to me. I looked
> at AuthCache (BasicAuthCache actually) and it never
> even references a credentials provider. It is
> caching a map of HttpHost->AuthScheme.
> 

Why should it? This is what credentials provider is for. The cache
contains auth challenges HttpClient can successfully respond to, not
user credentials.

> So I looked ocurrences of AuthProtocolState.FAILURE
> and while the AuthCache is invalidated, nowhere that I
> can find is any corresponding credentials provider
> be notified.
> 

I am not entirely sure why it should be notified. There is no definitive
way of telling why a particular auth response got rejected (other than
parsing the response body). 

You might create an object, tough, that is both credentials provider and
auth cache.

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