pub struct VerifyRequestInput<'a, H: HeaderMapView> {
pub headers: &'a H,
pub method: &'a str,
pub path: &'a str,
pub raw_query: &'a str,
pub canonical_body: &'a str,
pub nonce: &'a str,
pub context_id: &'a str,
pub max_age_seconds: u64,
pub clock_skew_seconds: u64,
}Expand description
Input for high-level request verification.
The middleware is responsible for:
- Looking up the context in the store → providing
nonceandcontext_id - Reading the body and canonicalizing it (based on content type)
- Providing the raw HTTP headers via
HeaderMapView
The verifier handles everything else: header extraction, validation, binding normalization, body hash comparison, and proof verification.
Fields§
§headers: &'a HHTTP headers (implements HeaderMapView for case-insensitive lookup)
method: &'a strHTTP method (e.g., “POST”, “GET”)
path: &'a strURL path without query string (e.g., “/api/transfer”)
raw_query: &'a strRaw query string without leading ? (e.g., “page=1&sort=name”)
canonical_body: &'a strCanonicalized body string (caller canonicalizes based on content type)
nonce: &'a strServer nonce (from store lookup, not from headers)
context_id: &'a strContext ID (from store lookup or header extraction)
max_age_seconds: u64Maximum allowed timestamp age in seconds (e.g., 300 = 5 minutes)
clock_skew_seconds: u64Clock skew tolerance in seconds (e.g., 60)
Auto Trait Implementations§
impl<'a, H> Freeze for VerifyRequestInput<'a, H>
impl<'a, H> RefUnwindSafe for VerifyRequestInput<'a, H>where
H: RefUnwindSafe,
impl<'a, H> Send for VerifyRequestInput<'a, H>where
H: Sync,
impl<'a, H> Sync for VerifyRequestInput<'a, H>where
H: Sync,
impl<'a, H> Unpin for VerifyRequestInput<'a, H>
impl<'a, H> UnsafeUnpin for VerifyRequestInput<'a, H>
impl<'a, H> UnwindSafe for VerifyRequestInput<'a, H>where
H: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more