InMemoryRememberTokenStore class

Bounded, process-local storage for remember-me tokens.

Implemented types

Constructors

InMemoryRememberTokenStore({DateTime clock()?, int maxEntries = 1024})
Creates a store with an optional clock and positive maxEntries limit.

Properties

hashCode int
The hash code for this object.
no setterinherited
maxEntries int
Maximum number of remember-me tokens retained by this local store.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

consume(String token) Future<AuthPrincipal?>
Returns and removes the principal for token exactly once.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(String token) Future<AuthPrincipal?>
Returns the stored principal for token, or null when unavailable.
override
remove(String token) Future<void>
Removes token from the store when it is present.
override
save(String token, AuthPrincipal principal, DateTime expiresAt) Future<void>
Stores a digest of token and a defensive copy of principal.
override
toString() String
A string representation of this object.
inherited

Operators

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