ข้ามไปยังเนื้อหา

Class MailgunInvitationDeliveryAspNetCoreOptions

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.MultiTenancy.Governance.MailgunDelivery.AspNetCore.Configuration
Assembly: Cephalon.MultiTenancy.Governance.MailgunDelivery.AspNetCore.dll

Configures ASP.NET Core Mailgun webhook callback translation for tenant-invitation delivery status updates.

public sealed class MailgunInvitationDeliveryAspNetCoreOptions

objectMailgunInvitationDeliveryAspNetCoreOptions

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

This adapter translates Mailgun webhook payloads and can require Mailgun HMAC-SHA256 webhook signature verification before reconciliation. It can also reject duplicate signed webhook tokens inside a bounded process-local replay window and skip duplicate Mailgun event identifiers already present in the delivery-status observation store. Durable callback inboxes and provider polling are intentionally separate slices.

MailgunInvitationDeliveryAspNetCoreOptions()

Section titled “ MailgunInvitationDeliveryAspNetCoreOptions()”

Initializes a new instance of the class.

public MailgunInvitationDeliveryAspNetCoreOptions()

Gets or sets a value indicating whether Mailgun parent-signature should be accepted for subaccount webhook events.

public bool AcceptParentSignature { get; set; }

bool

Mailgun includes parent-signature for subaccount events so receivers can validate with the parent account signing key. Disable this only when a host deliberately requires the child account signature field.

Gets or sets the actor value recorded on translated Mailgun delivery status observations.

public string Actor { get; set; }

string

Gets or sets a value indicating whether verified Mailgun signed webhook tokens should be protected against replay inside the current process.

public bool EnableSignedWebhookReplayProtection { get; set; }

bool

Replay protection is active only when is enabled and the request signature verifies successfully. The built-in guard stores bounded token fingerprints in memory and does not claim distributed replay protection or durable provider callback inbox ownership.

Gets or sets a value indicating whether the Mailgun webhook callback endpoint should be mapped.

public bool EnableStatusCallbackEndpoint { get; set; }

bool

Gets or sets a value indicating whether Mailgun webhook event identifiers should be used to skip duplicate translated events that are already present in the delivery-status observation store.

public bool EnableWebhookEventIdIdempotency { get; set; }

bool

The endpoint uses the stable event-data.id-backed observation id generated by the Mailgun mapper. This is observation-store-backed idempotency, not a durable raw callback inbox or distributed event ledger.

ExcludeStatusCallbackEndpointFromDescription

Section titled “ ExcludeStatusCallbackEndpointFromDescription”

Gets or sets a value indicating whether the Mailgun callback endpoint should be excluded from OpenAPI descriptions.

public bool ExcludeStatusCallbackEndpointFromDescription { get; set; }

bool

Gets or sets a value indicating whether Mailgun engagement events such as opened and clicked should be recorded as delivered.

public bool MapEngagementEventsAsDelivered { get; set; }

bool

The default is false so the endpoint records deliverability events only. Enable this when a host deliberately wants engagement events to update invitation delivery status.

Gets or sets the maximum number of Mailgun events accepted in one callback request.

public int MaxEventsPerRequest { get; set; }

int

Mailgun posts one JSON event object by default. The endpoint also accepts a JSON array for controlled replay and test harness scenarios while keeping the same bounded parsing posture.

Gets or sets the maximum request body size accepted by the Mailgun callback endpoint, in bytes.

public int MaxRequestBodyBytes { get; set; }

int

NormalizeProviderMessageIdWithAngleBrackets

Section titled “ NormalizeProviderMessageIdWithAngleBrackets”

Gets or sets a value indicating whether Mailgun message.headers.message-id values should be wrapped in angle brackets.

public bool NormalizeProviderMessageIdWithAngleBrackets { get; set; }

bool

Mailgun Messages API responses commonly return an angle-bracketed message id, while webhook headers may surface the same id without brackets. This normalization keeps Cephalon’s provider-message guard useful.

Gets or sets a value indicating whether translated delivery status should be recorded on the invitation.

public bool RecordStatus { get; set; }

bool

Gets or sets a value indicating whether translated Mailgun events must match an existing provider message id.

public bool RequireProviderMessageMatch { get; set; }

bool

Mailgun webhook payloads expose the message identifier through message.headers.message-id. The default keeps provider-message guarding enabled and wraps header values in angle brackets to match the Messages API response id shape used by the sender package.

Gets or sets a value indicating whether Mailgun webhook requests must carry a valid Mailgun signature before payload translation and reconciliation can run.

public bool RequireSignedWebhook { get; set; }

bool

When enabled, the endpoint verifies the Mailgun HMAC-SHA256 hex digest over timestamp + token using the configured webhook signing key. Signature verification is separate from replay-token caching so hosts can adopt authentication first without claiming durable inbox or distributed replay ownership.

Gets or sets a value indicating whether the Mailgun callback endpoint should require authorization.

public bool RequireStatusCallbackAuthorization { get; set; }

bool

The endpoint performs an in-handler authorization check by default. Hosts can satisfy it with ASP.NET Core authentication, a gateway, or deliberately disable it for trusted test hosts.

Gets or sets the maximum number of verified Mailgun webhook token fingerprints retained in the current process.

public int SignedWebhookReplayCacheLimit { get; set; }

int

When the bounded cache is full, the oldest token fingerprint is evicted before recording a new accepted signed callback.

Gets or sets the process-local retention window, in seconds, for verified Mailgun webhook token fingerprints.

public int SignedWebhookReplayRetentionSeconds { get; set; }

int

The endpoint clamps the effective retention to at least one second. The default matches the signature timestamp tolerance.

Gets or sets the allowed clock skew, in seconds, for signed Mailgun webhook timestamps.

public int SignedWebhookSignatureToleranceSeconds { get; set; }

int

The endpoint clamps the effective tolerance to at least one second. The default is five minutes.

Gets or sets the source value recorded on translated Mailgun delivery status observations.

public string Source { get; set; }

string

Gets or sets the optional ASP.NET Core authorization policy required by the Mailgun callback endpoint.

public string? StatusCallbackAuthorizationPolicy { get; set; }

string?

Gets or sets the ASP.NET Core route pattern used for Mailgun webhook callbacks.

public string StatusCallbackRoutePattern { get; set; }

string

The default route stays under /engine because this endpoint is a provider-adapter ingress surface, not an application-owned onboarding API.

Gets or sets the Mailgun webhook signing key used for HMAC-SHA256 verification.

public string? WebhookSigningKey { get; set; }

string?

This is the Mailgun Send webhook signing key, not the Mailgun API key or an Alerts webhook signing key.

FromConfiguration(IConfiguration?, string)

Section titled “ FromConfiguration(IConfiguration?, string)”

Reads Mailgun ASP.NET Core callback options from configuration.

public static MailgunInvitationDeliveryAspNetCoreOptions FromConfiguration(IConfiguration? configuration, string sectionPath = "Engine")

configuration IConfiguration?

The root configuration that contains the engine section.

sectionPath string

The engine root section path to read from.

MailgunInvitationDeliveryAspNetCoreOptions

The parsed Mailgun ASP.NET Core callback options.