Things I'm considering fixing:
PasswordClient (and its friends plain and digest) return Result<_, String>. They should use a real std::error::Error impl instead.
- Each digest type should probably be an individual optional dependency, rather than having
digest pull in both md5 and sha2 crates. In particular, I think it's rare for servers to use the SHA digest types, and folks might not want to have that dependency.
- Rename
http_auth::digest::Algorithm::Sha512Trunc256 to Sha512_256 to match the change with sha2 version 0.10.0.
ParamValue should probably be called ParamValueRef for consistency with ChallengeRef.
http_auth::basic::BasicClient and http_auth::digest::DigestClient maybe should be http_auth::basic::Client and http_auth::digest::Client respectively to eliminate the "stuttering" in the type names.
http_auth::PasswordClientBuilder could just take a with method based on a trait that adds stuff to the client, avoiding the need for somewhat arbitrarily chosen distinct method names for the str vs ChallengeRef vs http::HeaderValue vs http::GetAll cases
Other suggestions welcome.
Things I'm considering fixing:
PasswordClient(and its friendsplainanddigest) returnResult<_, String>. They should use a realstd::error::Errorimpl instead.digestpull in bothmd5andsha2crates. In particular, I think it's rare for servers to use the SHA digest types, and folks might not want to have that dependency.http_auth::digest::Algorithm::Sha512Trunc256toSha512_256to match the change with sha2 version 0.10.0.ParamValueshould probably be calledParamValueReffor consistency withChallengeRef.http_auth::basic::BasicClientandhttp_auth::digest::DigestClientmaybe should behttp_auth::basic::Clientandhttp_auth::digest::Clientrespectively to eliminate the "stuttering" in the type names.http_auth::PasswordClientBuildercould just take awithmethod based on a trait that adds stuff to the client, avoiding the need for somewhat arbitrarily chosen distinct method names for thestrvsChallengeRefvshttp::HeaderValuevshttp::GetAllcasesOther suggestions welcome.