rburgst / okhttp-digest

a digest authenticator for okhttp
Apache License 2.0
191 stars 42 forks source link

Does BasicAuthenticator.proxy cause a concurrency bug? #50

Closed yschimke closed 4 years ago

yschimke commented 6 years ago

Seems like two concurrent requests could get confused

yschimke commented 6 years ago

Awkwardly it seems to be also how BasicAuthenticator knows which type to authenticate (proxy/WWW). Could this be avoided by using builder.proxyAuthenticator as well as builder.authenticator?

rburgst commented 6 years ago

you are correct and it could but it would require a more complex setup. Need to think about it. Do you have a specific case where this causes a problem?

yschimke commented 6 years ago

Yep - I'll link to it when it's landed. I'm getting it working without Caching, implementing my own BasicAuthenticator for now. Probably Kerberos next.

Essentially this hit whenever you want to use your nice library as part of another one. Unless you are the end user, it's hard to know whether it will need basic auth for both proxy and WWW together.

rburgst commented 4 years ago

any updates? Otherwise I would like to close this.

yschimke commented 4 years ago

Close away. No updates. Sorry