rburgst / okhttp-digest

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

How can I Set Realm and Client Nonce in ADVANCED of Authorization Digest Auth #73

Closed JustZK closed 3 years ago

JustZK commented 3 years ago

Hi, I would like to modify the value of Realm and Client Nonce in the advanced management of Authorization Digest Auth. How can I change it?

Lotsssss of thanks!

ShaoYX94 commented 3 years ago

Good issues

rburgst commented 3 years ago

hi, right now there is no way to influence the client nonce. I am not entirely sure what you mean by "advanced management" however, per definition, the client nonce should be a random number created by the client for every authentication flow. The current implementation is based on the apache httpclient digest auth scheme, since it didnt have this feature either, I am very surprised that someone needs it here.

Regarding the Realm, this is solely dependent on the server. There is no way to influence the realm on the client.

JustZK commented 3 years ago

Thank you for your reply! You are right. I read the digest rules again and confirmed that what you said is completely correct by a TCP Socket demo .