From 252022f26b522d26553b71d546fcc7e4a86458a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Wed, 27 Feb 2019 14:09:27 +0100 Subject: [PATCH] forgot to make some fields public --- Cargo.toml | 2 +- src/digest.rs | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7d10528..71fa75a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "digest_auth" -version = "0.1.1" +version = "0.1.2" authors = ["Ondřej Hruška "] edition = "2018" description = "Implementation of the Digest Auth algorithm as defined in IETF RFC 2069, 2617, and 7616, intended for HTTP clients" diff --git a/src/digest.rs b/src/digest.rs index aa9463c..a2b7f83 100644 --- a/src/digest.rs +++ b/src/digest.rs @@ -27,8 +27,8 @@ pub enum AlgorithmType { /// Algorithm and the -sess flag pair #[derive(Debug, PartialEq)] pub struct Algorithm { - algo: AlgorithmType, - sess: bool, + pub algo: AlgorithmType, + pub sess: bool, } impl Algorithm { @@ -221,18 +221,18 @@ impl Display for HttpMethod { #[derive(Debug)] pub struct AuthContext<'a> { /// Login username - username: &'a str, + pub username: &'a str, /// Login password (plain) - password: &'a str, + pub password: &'a str, /// Requested URI (not a domain! should start with a slash) - uri: &'a str, + pub uri: &'a str, /// Request payload body - used for auth-int (auth with integrity check) /// May be left out if not using auth-int - body: Option<&'a [u8]>, + pub body: Option<&'a [u8]>, /// HTTP method used (defaults to GET) - method: HttpMethod, + pub method: HttpMethod, /// Spoofed client nonce (use only for tests; a random nonce is generated automatically) - cnonce: Option<&'a str>, + pub cnonce: Option<&'a str>, } impl<'a> AuthContext<'a> {