SecurityEngine class
The core orchestrator of the SIMOSEC pipeline.
SecurityEngine owns an ordered list of SecurityLayers and pushes a RequestContext through them sequentially. Execution stops at the first layer that blocks the request (fail-fast), so expensive layers can be placed after cheap ones for better performance.
The engine does not know anything about what each layer checks — that separation keeps it open for extension (new layers) but closed for modification (the engine itself never needs to change).
Constructors
-
SecurityEngine({required List<
SecurityLayer> layers, LayerObserver? onLayerResult}) -
Creates an engine that runs requests through
layersin order.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
layers
→ List<
SecurityLayer> -
The ordered list of layers this engine runs each request through.
final
- onLayerResult → LayerObserver?
-
Optional hook invoked after every layer runs, useful for custom
logging/metrics without subclassing.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
process(
RequestContext context) → Future< SecurityResult> -
Runs
contextthrough every layer in order. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited