SecurityConfig class

Centralized, tunable configuration shared across layers.

Individual layers still accept their own constructor overrides (e.g. PayloadSizeLayer.maxPayloadSize) for fine-grained control, but default to the values here when no explicit override is given. Pass a single SecurityConfig instance to every layer you build to keep thresholds consistent across the pipeline.

Constructors

SecurityConfig({int maxPayloadSize = 1024 * 1024, double blockThreshold = 0.8, double flagThreshold = 0.5})
Creates a configuration. Defaults to a 1 MB payload limit and block/flag thresholds of 0.8/0.5.
const

Properties

blockThreshold → double
Risk score above which QuantumQuarantineLayer blocks a request outright.
final
flagThreshold → double
Risk score above which QuantumQuarantineLayer flags a request for review without blocking it.
final
hashCode → int
The hash code for this object.
no setterinherited
maxPayloadSize → int
Maximum accepted request payload size, in bytes. Requests larger than this are rejected by PayloadSizeLayer before any other processing.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({int? maxPayloadSize, double? blockThreshold, double? flagThreshold}) → SecurityConfig
Returns a copy of this configuration with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited