pub struct ProofEnvelope<'a> {
pub proof: &'a str,
pub method: &'a str,
pub uri: &'a str,
pub now_unix: u64,
pub expected_subject_hint: Option<&'a str>,
}Expand description
Proof envelope passed to every SelfSignedVerifier implementation.
The fields are borrowed so callers do not allocate on the hot path.
Concrete verifiers interpret proof according to their own wire
format (JWT compact serialisation, base64 Nostr event, etc.).
Fields§
§proof: &'a strWire-format proof string (JWT / NIP-98 event / …).
method: &'a strCanonical HTTP method in upper-case (GET, POST, …). Matches
the DPoP htm / NIP-98 method tag.
uri: &'a strAbsolute request URI. Matches the DPoP htu / NIP-98 u tag.
now_unix: u64Caller’s current wall-clock time in seconds since the Unix epoch.
Passed explicitly for deterministic tests; production callers use
SystemTime::now().
expected_subject_hint: Option<&'a str>Optional subject hint — for example, the WebID supplied in a
request’s Authorization metadata. A verifier MAY use it to
short-circuit matching but MUST NOT accept a proof whose actual
verification output disagrees with the hint.
Trait Implementations§
Source§impl<'a> Clone for ProofEnvelope<'a>
impl<'a> Clone for ProofEnvelope<'a>
Source§fn clone(&self) -> ProofEnvelope<'a>
fn clone(&self) -> ProofEnvelope<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more