FakeAccountServer class final

In-memory cloud account server.

Constructors

FakeAccountServer({Duration accessTtl = const Duration(minutes: 15)})
Creates an empty fake; accessTtl = lifetime of access tokens.

Properties

accessTtl ↔ Duration
Access-token lifetime.
getter/setter pair
baseUri → Uri
Base URI clients use.
final
endpoint → FreedomeEndpoint
Endpoint.
no setter
hashCode → int
The hash code for this object.
no setterinherited
mails → List<(String, String, String)>
Mails "sent" (to, kind, token) — tests read tokens from here.
final
requests → List<FreedomeRequest>
Requests received.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transports → FreedomeTransportFactory
Transport factory for FreedomeAccountClient(transports: …).
no setter

Methods

expireTokens({bool refreshToo = false}) → void
Invalidates every access token (refreshToo: refresh tokens too).
handle(FreedomeRequest r) → Future<FreedomeResponse>
Handles a request.
lastToken(String email, String kind) → String?
The last mail token of kind (verify, reset, magic) sent to email.
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