FreshnessPolicy class
How a consumer bounds a document in time before acting on it.
Constructors
- FreshnessPolicy({Duration skew = defaultSkew, Duration? maxAge, bool requireIssuedAt = false})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxAge → Duration?
-
The oldest
issuedAtthis consumer accepts, measured back fromnow. Null means unbounded — and is the only setting under which a document carrying neither timestamp is acceptable.final - requireIssuedAt → bool
-
Reject a document carrying no
issuedAt, withmalformedRequest.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skew → Duration
-
Tolerance applied to the document's timestamps against this consumer's
clock, per SPEC §4.2. Applied to the future-dating check and to maxAge;
not to
expiresAt, which validateBasic compares against the rawnowit is given.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- consequential → const FreshnessPolicy
-
The posture SPEC §7.2 (Bounding the record) describes for a
consequential Trust Task (§2):
issuedAtREQUIRED and a bounded acceptance window, so every accepted document sits inside a window a ReplayGuard can retain a record for. - defaults → const FreshnessPolicy
- The minimum every consumer should apply: reject a future-dated document and one whose stated validity interval is empty. No conforming producer emits either, so this costs a correct deployment nothing.