AtKeysAssurance class

Single home for all atKeys validation: low-level parsing/value checks (expect*/optional*, called by the models' fromJson) and cross-material structural invariants (validateKeyMaterials, validateAddKey, validateMapUpdate).

Constructors

AtKeysAssurance()
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

expectBytes(Object? value, String fieldName) → AtBytes
expectDateTime(Object? value, String fieldName) → DateTime
expectEnum<T extends Enum>(Object? value, List<T> values, String fieldName) → T
expectInt(Object? value, String fieldName) → int
expectList(Object? value, String fieldName) → List
expectMap(Object? value, String fieldName) → Map<String, dynamic>
expectNonEmptyString(Object? value, String fieldName) → String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
optionalString(Object? value, String fieldName) → String?
optionalStringList(Object? value, String fieldName) → List<String>
refuseSecondLiveEnrollment({required Iterable<CryptographicMaterial> existing, required CryptographicMaterial candidate}) → void
Refuses a second live enrollment — a second active CryptographicMaterialRole.privateAuthentication anywhere in the document.
toString() → String
A string representation of this object.
inherited
validateAddKey({required Iterable<CryptographicMaterial> existing, required CryptographicMaterial candidate}) → void
All of AtKeys.addKey's validation in one place. Rejects, in order: a duplicate (enrollmentId, keyId, role), and a second material of the same role for one enrollment across keyIds (the validateKeyMaterials invariant, held incrementally).
validateKeyMaterials(List<CryptographicMaterial> materials) → void
An enrollment may not contribute more than one active material of the same (CryptographicMaterialRole, CryptographicMaterialAlgorithm). (Duplicate keyIds within a container are rejected earlier, by parseAtKeysDocument.)
validateMapUpdate({required Map<String, dynamic> existing, required Map<String, dynamic> candidate}) → void

Operators

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