InMemoryTokenStorage class
A simple, isolate-local TokenStorage backed by a single field.
Useful for tests and short-lived processes. Not durable; tokens are lost when the process exits.
- Implemented types
Constructors
- InMemoryTokenStorage({Token? initial})
-
Creates an empty storage. Pass
initialto seed it.
Properties
Methods
-
clone(
) → InMemoryTokenStorage - Returns a new InMemoryTokenStorage seeded with the same token.
-
delete(
) → Future< void> -
Removes any stored token. A no-op if storage is empty.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
) → Future< Token?> -
Returns the stored token or
nullif none was written.override -
toString(
) → String -
A string representation of this object.
inherited
-
write(
Token token) → Future< void> -
Persists
token, replacing any previous entry.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited