AuthStore class

Base authentication store management service that keep tracks of the authenticated User/Admin model and its token.

Implementers

Constructors

AuthStore.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
isValid bool
Loosely checks if the current AuthStore has valid auth data (eg. whether the token is expired or not).
no setter
model → dynamic
no setter
onChange Stream<AuthStoreEvent>
Stream that gets triggered on each auth store change (aka. on save() and clear() call).
no setter
record RecordModel?
Returns the saved auth record (if any).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
token String
Returns the saved auth token (if any).
no setter

Methods

clear() → void
Clears the previously stored token and record auth data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save(String newToken, RecordModel? newRecord) → void
Saves the provided newToken and newRecord auth data into the store.
toString() String
A string representation of this object.
inherited

Operators

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