TrustPinValidationEvent class
A definitive pin-validation verdict reported by the native TrustPin SDK.
Delivered through TrustPin.validationEvents. Events exist for field telemetry — recording suspected machine-in-the-middle incidents and monitoring a pinning rollout — and are strictly observational: by the time an event reaches Dart the connection has already been allowed or rejected, and nothing done with the event can change that verdict.
Failure events fire only for definitive pin verdicts — PINS_MISMATCH,
ALL_PINS_EXPIRED, and DOMAIN_NOT_REGISTERED (strict mode). Transient
conditions (configuration fetch failures, timeouts, lifecycle errors) fail
verification per the documented error contract but are operational noise,
not pin verdicts, and produce no event. Success events fire when a
registered domain's certificate matches a pin; permissive-mode connections
to unregistered domains produce no event.
Constructors
- TrustPinValidationEvent({required String instanceId, required String domain, TrustPinException? error, String? certificatePem})
-
Creates a validation event. Exposed for testing; production events are
constructed from the platform stream.
const
-
TrustPinValidationEvent.fromMap(Map<
Object?, Object?> map) -
Decodes an event map received from the platform event channel.
factory
Properties
- certificatePem → String?
-
The PEM-encoded leaf certificate the server presented. Set only on
failure events.
final
- domain → String
-
The domain the certificate was evaluated against, as evaluated
(canonicalized when canonicalization succeeded).
final
- error → TrustPinException?
-
The verdict for a failure event, carrying the stable error code
(
PINS_MISMATCH,ALL_PINS_EXPIRED, orDOMAIN_NOT_REGISTERED).nullfor a success event.final - hashCode → int
-
The hash code for this object.
no setterinherited
- instanceId → String
-
Identifier of the TrustPin instance that evaluated the connection.
'default'for TrustPin.shared.final - isFailure → bool
-
Whether pin validation reached a definitive failure verdict.
no setter
- isSuccess → bool
-
Whether a registered domain's certificate matched a configured pin.
no setter
- 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
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited