pub struct WebhookAuth {
pub hmac: Option<Hmac>,
pub bearer: Option<Secret>,
pub header: Option<HeaderMatch>,
pub none: bool,
}Expand description
A webhook’s inbound authentication. Best practice (and the default guidance)
is HMAC over the raw body; a required-header or bearer match are alternatives;
none: true is an explicit loopback-only dev opt-out.
Fields§
§hmac: Option<Hmac>HMAC signature verification over the raw request body (GitHub/Stripe-style).
bearer: Option<Secret>A shared bearer token (Authorization: Bearer …), constant-time matched.
header: Option<HeaderMatch>A required header exact-match ({name, equals}).
none: boolLoopback-only, no auth (dev). Explicit opt-in.
Trait Implementations§
Source§impl Clone for WebhookAuth
impl Clone for WebhookAuth
Source§fn clone(&self) -> WebhookAuth
fn clone(&self) -> WebhookAuth
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 moreSource§impl Debug for WebhookAuth
impl Debug for WebhookAuth
Source§impl Default for WebhookAuth
impl Default for WebhookAuth
Source§fn default() -> WebhookAuth
fn default() -> WebhookAuth
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WebhookAuthwhere
WebhookAuth: Default,
impl<'de> Deserialize<'de> for WebhookAuthwhere
WebhookAuth: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WebhookAuth
impl PartialEq for WebhookAuth
impl StructuralPartialEq for WebhookAuth
Auto Trait Implementations§
impl Freeze for WebhookAuth
impl RefUnwindSafe for WebhookAuth
impl Send for WebhookAuth
impl Sync for WebhookAuth
impl Unpin for WebhookAuth
impl UnsafeUnpin for WebhookAuth
impl UnwindSafe for WebhookAuth
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