pub struct LinearStatusWebhook;Expand description
Linear’s inbound status webhook, over core’s ProviderScheme:
Linear-Signature: <hex>, HMAC-SHA256 over the raw body with no prefix,
read by cratefield_core::receive_status — verify, then parse.
Replay protection is not provided here. Linear signs the raw body
alone — its webhookTimestamp (ms) rides inside that body, not in a
header — and core’s ProviderScheme can only bind a timestamp header
into the signed payload, so the verifier’s replay tolerance has nothing to
run on and a captured delivery verifies forever, exactly as with Jira.
This type parses the body and nothing else; a caller wanting a freshness
window must read webhookTimestamp (and the delivery’s webhookId) out of
the already-verified body itself. Terminate on TLS and rotate the
per-tenant secret either way.
Trait Implementations§
Source§impl StatusWebhook for LinearStatusWebhook
impl StatusWebhook for LinearStatusWebhook
Source§fn verifier(&self) -> WebhookVerifier
fn verifier(&self) -> WebhookVerifier
Constant-time compare, fail-closed on unreadable input: inherited
from core’s WebhookVerifier, never re-derived here.
Source§fn parse(&self, body: &[u8]) -> Result<Option<StatusUpdate>, InboundStatusError>
fn parse(&self, body: &[u8]) -> Result<Option<StatusUpdate>, InboundStatusError>
Reads one verified delivery. An update on "type": "Issue"
that carries a state and names the state it came from
(updatedFrom.stateId) maps onto a StatusUpdate keyed by the same
issue UUID Tracker::file returns; every other event, and an update
that touched no state, is Ok(None) — verified silence, not an error.
§Errors
InboundStatusError::Malformed when the verified body is not JSON or
not an event of the shape Linear sends, or a state change arrives with
no id to key it by. Never InboundStatusError::Signature — that
belongs to cratefield_core::receive_status, before parsing.
Source§fn kind(&self) -> &'static str
fn kind(&self) -> &'static str
Destination::kind uses for the outbound direction.