Skip to main content

VerifyRequestInput

Struct VerifyRequestInput 

Source
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 nonce and context_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 H

HTTP headers (implements HeaderMapView for case-insensitive lookup)

§method: &'a str

HTTP method (e.g., “POST”, “GET”)

§path: &'a str

URL path without query string (e.g., “/api/transfer”)

§raw_query: &'a str

Raw query string without leading ? (e.g., “page=1&sort=name”)

§canonical_body: &'a str

Canonicalized body string (caller canonicalizes based on content type)

§nonce: &'a str

Server nonce (from store lookup, not from headers)

§context_id: &'a str

Context ID (from store lookup or header extraction)

§max_age_seconds: u64

Maximum allowed timestamp age in seconds (e.g., 300 = 5 minutes)

§clock_skew_seconds: u64

Clock 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.