FakeAuth class final

Scriptable IAuth fake. Successive fetchAllTokens calls return successive batches (the last repeats), modelling the force-refresh claim-repair path.

Implemented types

Constructors

FakeAuth(List<Map<ResourceKey, Result<ResourceToken>>> batches)

Properties

batches List<Map<ResourceKey, Result<ResourceToken>>>
final
fetchAllCount int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
invalidateAllCount int
getter/setter pair
invalidated List<String>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fetchAllTokens(Iterable<ResourceKey> keys) Future<Map<ResourceKey, Result<ResourceToken>>>
Eager all-token batch: dedups keys by full ResourceKey, starts acquisition for EVERY key before awaiting any, and returns a total map with exactly one terminal entry per requested key. Lazy first-call acquisition is not permitted.
override
invalidate(ResourceKey key) → void
Drops one resource's cached token.
override
invalidateAll() → void
Drops every cached resource token (used on sign-out / force-refresh).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
tokenFor(ResourceKey key) Future<Result<ResourceToken>>
Resolves one resource's token, serving the cache when still valid.
override
toString() String
A string representation of this object.
inherited

Operators

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