forgot to make some fields public

master
Ondřej Hruška 6 years ago
parent 18c2b2a107
commit 252022f26b
Signed by untrusted user: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 2
      Cargo.toml
  2. 16
      src/digest.rs

@ -1,6 +1,6 @@
[package] [package]
name = "digest_auth" name = "digest_auth"
version = "0.1.1" version = "0.1.2"
authors = ["Ondřej Hruška <ondra@ondrovo.com>"] authors = ["Ondřej Hruška <ondra@ondrovo.com>"]
edition = "2018" edition = "2018"
description = "Implementation of the Digest Auth algorithm as defined in IETF RFC 2069, 2617, and 7616, intended for HTTP clients" description = "Implementation of the Digest Auth algorithm as defined in IETF RFC 2069, 2617, and 7616, intended for HTTP clients"

@ -27,8 +27,8 @@ pub enum AlgorithmType {
/// Algorithm and the -sess flag pair /// Algorithm and the -sess flag pair
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
pub struct Algorithm { pub struct Algorithm {
algo: AlgorithmType, pub algo: AlgorithmType,
sess: bool, pub sess: bool,
} }
impl Algorithm { impl Algorithm {
@ -221,18 +221,18 @@ impl Display for HttpMethod {
#[derive(Debug)] #[derive(Debug)]
pub struct AuthContext<'a> { pub struct AuthContext<'a> {
/// Login username /// Login username
username: &'a str, pub username: &'a str,
/// Login password (plain) /// Login password (plain)
password: &'a str, pub password: &'a str,
/// Requested URI (not a domain! should start with a slash) /// 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) /// Request payload body - used for auth-int (auth with integrity check)
/// May be left out if not using auth-int /// May be left out if not using auth-int
body: Option<&'a [u8]>, pub body: Option<&'a [u8]>,
/// HTTP method used (defaults to GET) /// HTTP method used (defaults to GET)
method: HttpMethod, pub method: HttpMethod,
/// Spoofed client nonce (use only for tests; a random nonce is generated automatically) /// 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> { impl<'a> AuthContext<'a> {

Loading…
Cancel
Save