pub struct WebhookFixture {
pub profile: WebhookProfile,
pub secret: String,
pub payload: String,
pub headers: BTreeMap<String, String>,
pub timestamp: i64,
pub signature_input: String,
}Expand description
A generated webhook fixture.
Fields§
§profile: WebhookProfileProfile used to generate fixture semantics.
secret: StringSigning secret (test-only).
payload: StringCanonical payload body.
headers: BTreeMap<String, String>HTTP headers to attach to the request.
timestamp: i64Timestamp used in signature generation (unix epoch seconds).
signature_input: StringCanonical signature input/base string.
Implementations§
Source§impl WebhookFixture
impl WebhookFixture
Sourcepub fn near_miss_stale_timestamp(
&self,
max_age_secs: i64,
) -> NearMissWebhookFixture
pub fn near_miss_stale_timestamp( &self, max_age_secs: i64, ) -> NearMissWebhookFixture
Produce a stale-timestamp variant for replay-window tests.
Sourcepub fn near_miss_wrong_secret(&self) -> NearMissWebhookFixture
pub fn near_miss_wrong_secret(&self) -> NearMissWebhookFixture
Produce a wrong-secret variant for verifier mismatch tests.
Sourcepub fn near_miss_tampered_payload(&self) -> NearMissWebhookFixture
pub fn near_miss_tampered_payload(&self) -> NearMissWebhookFixture
Produce a tampered-payload variant for integrity tests.
Trait Implementations§
Source§impl Clone for WebhookFixture
impl Clone for WebhookFixture
Source§fn clone(&self) -> WebhookFixture
fn clone(&self) -> WebhookFixture
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WebhookFixture
impl RefUnwindSafe for WebhookFixture
impl Send for WebhookFixture
impl Sync for WebhookFixture
impl Unpin for WebhookFixture
impl UnsafeUnpin for WebhookFixture
impl UnwindSafe for WebhookFixture
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