version bump, updated readme

This commit is contained in:
2019-10-07 01:10:12 +02:00
parent 1947affd75
commit c10d96bf83
3 changed files with 9 additions and 5 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "digest_auth"
version = "0.1.3"
version = "0.2.0"
authors = ["Ondřej Hruška <ondra@ondrovo.com>"]
edition = "2018"
description = "Implementation of the Digest Auth algorithm as defined in IETF RFC 2069, 2617, and 7616, intended for HTTP clients"
+2 -2
View File
@@ -461,7 +461,7 @@ impl AuthorizationHeader {
nc: prompt.nc,
};
hdr.build_hash(context);
hdr.digest(context);
Ok(hdr)
}
@@ -479,7 +479,7 @@ impl AuthorizationHeader {
/// - cnonce (if it was None before)
/// - username copied from context
/// - response
pub fn build_hash(&mut self, context : &AuthContext)
pub fn digest(&mut self, context : &AuthContext)
{
// figure out which QOP option to use
let qop_algo = match self.qop {
+6 -2
View File
@@ -2,8 +2,12 @@
//! It can be used in conjunction with libraries like reqwest to access e.g. IP cameras
//! that use this authentication scheme.
//!
//! This library is intended for the http client. The algorithm is symmetrical,
//! it's just not optimized for / tested on the server side yet.
//! This library was written for the http client, but since the algorithm is symmetrical,
//! it can be used by the server side as well. Server-side nonce management (generation, timed
//! expiry) and authorization checking is left to user's implementation.
//!
//! The `AuthorizationHeader::digest()` method can be used server-side to replicate the
//! password/body hash; then just check if the computed digest matches what the user sent.
//!
//! # Examples
//!