diff --git a/Cargo.toml b/Cargo.toml index 32a9b17..353505a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "http-signature-normalization" description = "An HTTP Signatures library that leaves the signing to you" -version = "0.5.3" +version = "0.5.4" authors = ["asonix "] license-file = "LICENSE" readme = "README.md" @@ -16,7 +16,7 @@ members = [ "http-signature-normalization-actix", "http-signature-normalization-http", "http-signature-normalization-reqwest", - "http-signature-normalization-warp", + # "http-signature-normalization-warp", ] [dependencies] diff --git a/src/lib.rs b/src/lib.rs index c49a585..23c6130 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -99,6 +99,18 @@ pub enum PrepareVerifyError { /// Failed to build a signing string due to missing required headers pub struct RequiredError(HashSet); +impl RequiredError { + /// Retrieve the missing headers from the error + pub fn headers(&self) -> &HashSet { + &self.0 + } + + /// Take the headers from the error + pub fn take_headers(&mut self) -> HashSet { + std::mem::take(&mut self.0) + } +} + impl Config { /// Create a new Config with a default expiration of 10 seconds pub fn new() -> Self {