FakeAuth class

A fake per-resource token retriever implementing the real IAuth seam. Tokens are keyed by ResourceKey.mapKey so tests prove per-resource resolution with NO cross-backend bleed. Unknown keys fail closed (Err).

Implemented types

Constructors

FakeAuth(Map<String, String> _tokens, {DateTime? expiresAt})

Properties

hashCode → int
The hash code for this object.
no setterinherited
queried → List<String>
Resource map-keys asked for a token, in order (for bleed assertions).
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