Table of Contents

Class AuditMiddlewareOptions

Namespace
WorkflowForge.Extensions.Audit.Options
Assembly
WorkflowForge.Extensions.Audit.dll

Configuration options for Audit middleware. Controls audit logging behavior and detail level. Inherits common options functionality from WorkflowForgeOptionsBase.

public sealed class AuditMiddlewareOptions : WorkflowForgeOptionsBase, ICloneable
Inheritance
AuditMiddlewareOptions
Implements
Inherited Members

Constructors

AuditMiddlewareOptions()

Initializes a new instance with default section name.

public AuditMiddlewareOptions()

AuditMiddlewareOptions(string)

Initializes a new instance with custom section name.

public AuditMiddlewareOptions(string sectionName)

Parameters

sectionName string

Custom configuration section name.

Fields

DefaultSectionName

Default configuration section name for binding from appsettings.json.

public const string DefaultSectionName = "WorkflowForge:Extensions:Audit"

Field Value

string

Properties

DetailLevel

Gets or sets the audit detail level. Controls how much information is captured in audit entries. Default is Standard.

public AuditDetailLevel DetailLevel { get; set; }

Property Value

AuditDetailLevel

IncludeTimestamps

Gets or sets whether to include timestamps in audit entries. When true, all audit entries include precise timestamps. Default is true.

public bool IncludeTimestamps { get; set; }

Property Value

bool

IncludeUserContext

Gets or sets whether to include user context in audit entries. When true, captures user/principal information if available. Default is true.

public bool IncludeUserContext { get; set; }

Property Value

bool

LogDataPayloads

Gets or sets whether to log data payloads in audit entries. When true, includes the operation input and output rendered as strings (can be very verbose). Payloads are also captured when DetailLevel is Complete, and never at Minimal. Default is false.

public bool LogDataPayloads { get; set; }

Property Value

bool

Methods

Clone()

Creates a deep copy of this options instance.

public override object Clone()

Returns

object

A new instance with the same configuration values.

Validate()

Validates the configuration settings and returns any validation errors.

public override IList<string> Validate()

Returns

IList<string>

A list of validation error messages, empty if valid.