InMemoryTokenStorage class

A simple in-memory TokenStorage implementation.

Tokens are lost when the app process ends. Use a custom implementation backed by secure storage if persistence between restarts is required.

Implemented types

Constructors

InMemoryTokenStorage()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Clears all stored tokens.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readAccessToken() Future<String?>
Reads the stored access token, or null if none is stored.
override
readRefreshToken() Future<String?>
Reads the stored refresh token, or null if none is stored.
override
toString() String
A string representation of this object.
inherited
writeAccessToken(String token) Future<void>
Persists the given access token.
override
writeRefreshToken(String token) Future<void>
Persists the given refresh token.
override

Operators

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