AXIAM C++ SDK 1.0.0-alpha8
Authentication, authorization, JWKS & route guards (REST + mTLS)
Loading...
Searching...
No Matches
Public Attributes | List of all members
axiam::webhook::Options Struct Reference

Optional inputs to verify(). More...

#include <webhook.hpp>

Public Attributes

std::chrono::seconds tolerance {300}
 Two-sided freshness window.
 
std::function< std::int64_t()> now
 Time source in unix seconds.
 
std::optional< std::string > timestamp_header
 The separate X-Axiam-Timestamp header, if the receiver read it.
 
std::string event_type
 X-Axiam-Event, copied into the returned Event. Not covered by the MAC.
 
std::string delivery_id
 X-Axiam-Delivery, copied into the returned Event. Not covered by the MAC.
 

Detailed Description

Optional inputs to verify().

Member Data Documentation

◆ tolerance

std::chrono::seconds axiam::webhook::Options::tolerance {300}

Two-sided freshness window.

A delivery is rejected when abs(now - t) > tolerance, so a future-dated timestamp is rejected just like a stale one.

◆ now

std::function<std::int64_t()> axiam::webhook::Options::now

Time source in unix seconds.

Empty => the system clock. Injection seam for tests.

◆ timestamp_header

std::optional<std::string> axiam::webhook::Options::timestamp_header

The separate X-Axiam-Timestamp header, if the receiver read it.

It is redundant with t= (only t= is covered by the MAC), but when supplied it MUST match t= exactly or verification fails.

◆ event_type

std::string axiam::webhook::Options::event_type

X-Axiam-Event, copied into the returned Event. Not covered by the MAC.

◆ delivery_id

std::string axiam::webhook::Options::delivery_id

X-Axiam-Delivery, copied into the returned Event. Not covered by the MAC.


The documentation for this struct was generated from the following file: