pub struct SignatureConfig {
pub algorithm: SignatureAlgorithm,
pub header_name: &'static str,
pub secret_env: &'static str,
pub replay_window_secs: u64,
}Expand description
Configuration for webhook signature validation.
Fields§
§algorithm: SignatureAlgorithmAlgorithm used for signature verification.
header_name: &'static strHeader name containing the signature.
secret_env: &'static strEnvironment variable name containing the secret.
replay_window_secs: u64Maximum age, in seconds, that a request may have before it is rejected
as a replay. For non-Stripe schemes the runtime reads
x-webhook-timestamp and compares to now. A value of 0 disables
replay enforcement (not recommended). Stripe always uses its own
300s window from the t= field and ignores this setting.
Trait Implementations§
Source§impl Clone for SignatureConfig
impl Clone for SignatureConfig
Source§fn clone(&self) -> SignatureConfig
fn clone(&self) -> SignatureConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SignatureConfig
impl RefUnwindSafe for SignatureConfig
impl Send for SignatureConfig
impl Sync for SignatureConfig
impl Unpin for SignatureConfig
impl UnsafeUnpin for SignatureConfig
impl UnwindSafe for SignatureConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more