Class SendGridInvitationDeliveryAspNetCoreOptions
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.MultiTenancy.Governance.SendGridDelivery.AspNetCore.Configuration
Assembly: Cephalon.MultiTenancy.Governance.SendGridDelivery.AspNetCore.dll
Configures ASP.NET Core SendGrid Event Webhook callback translation for tenant-invitation delivery status updates.
public sealed class SendGridInvitationDeliveryAspNetCoreOptionsInheritance
Section titled “Inheritance”object ← SendGridInvitationDeliveryAspNetCoreOptions
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”SendGridInvitationDeliveryAspNetCoreOptions()
Section titled “ SendGridInvitationDeliveryAspNetCoreOptions()”Initializes a new instance of the
public SendGridInvitationDeliveryAspNetCoreOptions()Properties
Section titled “Properties”Gets or sets the actor value recorded on translated SendGrid delivery status observations.
public string Actor { get; set; }Property Value
Section titled “Property Value”EnableEventWebhookEventIdIdempotency
Section titled “ EnableEventWebhookEventIdIdempotency”Gets or sets a value indicating whether SendGrid Event Webhook event identifiers should be used to skip duplicate translated events that are already present in the delivery-status observation store.
public bool EnableEventWebhookEventIdIdempotency { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The endpoint uses the stable sg_event_id-backed observation id generated by the SendGrid mapper. This is
observation-store-backed idempotency, not a durable raw callback inbox or distributed replay ledger.
EnableSignedEventWebhookReplayProtection
Section titled “ EnableSignedEventWebhookReplayProtection”Gets or sets a value indicating whether verified SendGrid signed Event Webhook requests should be protected against replay inside the current process.
public bool EnableSignedEventWebhookReplayProtection { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Replay protection is active only when
EnableStatusCallbackEndpoint
Section titled “ EnableStatusCallbackEndpoint”Gets or sets a value indicating whether the SendGrid Event Webhook callback endpoint should be mapped.
public bool EnableStatusCallbackEndpoint { get; set; }Property Value
Section titled “Property Value”ExcludeStatusCallbackEndpointFromDescription
Section titled “ ExcludeStatusCallbackEndpointFromDescription”Gets or sets a value indicating whether the SendGrid callback endpoint should be excluded from OpenAPI descriptions.
public bool ExcludeStatusCallbackEndpointFromDescription { get; set; }Property Value
Section titled “Property Value”MapEngagementEventsAsDelivered
Section titled “ MapEngagementEventsAsDelivered”Gets or sets a value indicating whether SendGrid engagement events such as open and click should be recorded as delivered.
public bool MapEngagementEventsAsDelivered { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”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.
MaxEventsPerRequest
Section titled “ MaxEventsPerRequest”Gets or sets the maximum number of SendGrid events accepted in one callback request.
public int MaxEventsPerRequest { get; set; }Property Value
Section titled “Property Value”MaxRequestBodyBytes
Section titled “ MaxRequestBodyBytes”Gets or sets the maximum request body size accepted by the SendGrid callback endpoint, in bytes.
public int MaxRequestBodyBytes { get; set; }Property Value
Section titled “Property Value”NormalizeProviderMessageIdFromSgMessageId
Section titled “ NormalizeProviderMessageIdFromSgMessageId”Gets or sets a value indicating whether the prefix before the first dot in sg_message_id should be used for provider matching.
public bool NormalizeProviderMessageIdFromSgMessageId { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Twilio SendGrid recommends storing the Mail Send API X-Message-ID response header to correlate Event
Webhook posts. Event Webhook payloads carry sg_message_id; the prefix commonly matches the stored
X-Message-ID, so this option keeps Cephalon’s provider-message guard usable without weakening it.
RecordStatus
Section titled “ RecordStatus”Gets or sets a value indicating whether translated delivery status should be recorded on the invitation.
public bool RecordStatus { get; set; }Property Value
Section titled “Property Value”RequireProviderMessageMatch
Section titled “ RequireProviderMessageMatch”Gets or sets a value indicating whether translated SendGrid events must match an existing provider message id.
public bool RequireProviderMessageMatch { get; set; }Property Value
Section titled “Property Value”RequireSignedEventWebhook
Section titled “ RequireSignedEventWebhook”Gets or sets a value indicating whether SendGrid signed Event Webhook requests must verify before translation.
public bool RequireSignedEventWebhook { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”When enabled, the endpoint verifies the SendGrid ECDSA-SHA256 signature over the exact raw request body plus the timestamp header before parsing JSON or reconciling any event. The public verification key must be configured.
RequireStatusCallbackAuthorization
Section titled “ RequireStatusCallbackAuthorization”Gets or sets a value indicating whether the SendGrid callback endpoint should require authorization.
public bool RequireStatusCallbackAuthorization { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The endpoint performs an in-handler authorization check by default. Hosts can satisfy it with ASP.NET Core authentication, a SendGrid OAuth policy, a gateway, or deliberately disable it for trusted test hosts.
SignedEventWebhookPublicKey
Section titled “ SignedEventWebhookPublicKey”Gets or sets the SendGrid public verification key used for signed Event Webhook verification.
public string? SignedEventWebhookPublicKey { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The value may be a PEM public key or a Base64-encoded SubjectPublicKeyInfo payload. Environment-variable friendly
escaped newlines (\n) are normalized before import.
SignedEventWebhookReplayCacheLimit
Section titled “ SignedEventWebhookReplayCacheLimit”Gets or sets the maximum number of verified SendGrid signed Event Webhook fingerprints retained in the current process.
public int SignedEventWebhookReplayCacheLimit { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”When the bounded cache is full, the oldest fingerprint is evicted before recording a new accepted signed callback.
SignedEventWebhookReplayRetentionSeconds
Section titled “ SignedEventWebhookReplayRetentionSeconds”Gets or sets the process-local retention window, in seconds, for verified SendGrid signed Event Webhook fingerprints.
public int SignedEventWebhookReplayRetentionSeconds { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The endpoint clamps the effective retention to at least one second. The default matches the signature timestamp tolerance.
SignedEventWebhookSignatureHeaderName
Section titled “ SignedEventWebhookSignatureHeaderName”Gets or sets the request header that carries the SendGrid Event Webhook signature.
public string SignedEventWebhookSignatureHeaderName { get; set; }Property Value
Section titled “Property Value”SignedEventWebhookSignatureToleranceSeconds
Section titled “ SignedEventWebhookSignatureToleranceSeconds”Gets or sets the allowed clock skew, in seconds, for SendGrid signed Event Webhook timestamps.
public int SignedEventWebhookSignatureToleranceSeconds { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The endpoint clamps the effective tolerance to at least one second. The default is five minutes.
SignedEventWebhookTimestampHeaderName
Section titled “ SignedEventWebhookTimestampHeaderName”Gets or sets the request header that carries the Unix timestamp included in the SendGrid Event Webhook signature.
public string SignedEventWebhookTimestampHeaderName { get; set; }Property Value
Section titled “Property Value”Source
Section titled “ Source”Gets or sets the source value recorded on translated SendGrid delivery status observations.
public string Source { get; set; }Property Value
Section titled “Property Value”StatusCallbackAuthorizationPolicy
Section titled “ StatusCallbackAuthorizationPolicy”Gets or sets the optional ASP.NET Core authorization policy required by the SendGrid callback endpoint.
public string? StatusCallbackAuthorizationPolicy { get; set; }Property Value
Section titled “Property Value”StatusCallbackRoutePattern
Section titled “ StatusCallbackRoutePattern”Gets or sets the ASP.NET Core route pattern used for SendGrid Event Webhook callbacks.
public string StatusCallbackRoutePattern { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The default route stays under /engine because this endpoint is a provider-adapter ingress surface, not an
application-owned onboarding API.
Methods
Section titled “Methods”FromConfiguration(IConfiguration?, string)
Section titled “ FromConfiguration(IConfiguration?, string)”Reads SendGrid ASP.NET Core callback options from configuration.
public static SendGridInvitationDeliveryAspNetCoreOptions FromConfiguration(IConfiguration? configuration, string sectionPath = "Engine")Parameters
Section titled “Parameters”configuration IConfiguration?
The root configuration that contains the engine section.
sectionPath string
The engine root section path to read from.
Returns
Section titled “Returns”SendGridInvitationDeliveryAspNetCoreOptions
The parsed SendGrid ASP.NET Core callback options.