DatabaseAuthRepository class
Database implementation of AuthRepository
This class implements the AuthRepository interface using the Khadem database layer. It provides concrete implementations for all authentication data access operations.
- Implemented types
Constructors
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
-
cleanupExpiredTokens(
) → Future< int> -
Cleans up expired tokens
override
-
deleteToken(
String token) → Future< int> -
Deletes a token
override
-
deleteUserTokens(
dynamic userId, {String? guard, Map< String, dynamic> ? filter}) → Future<int> -
Deletes all tokens for a user
override
-
findToken(
String token) → Future< Map< String, dynamic> ?> -
Finds a token record
override
-
findTokensByFilter(
Map< String, dynamic> filters) → Future<List< Map< >String, dynamic> > - Finds tokens by filter criteria
-
findTokensByPrefix(
String prefix, {String? type, String? guard}) → Future< List< Map< >String, dynamic> > - Find tokens by their token string prefix
-
findTokensByUser(
dynamic userId, [String? guard]) → Future< List< Map< >String, dynamic> > -
Finds all tokens for a user
override
-
findUserByCredentials(
Map< String, dynamic> credentials, List<String> fields, String table) → Future<Map< String, dynamic> ?> -
Finds a user by credentials
override
-
findUserById(
dynamic id, String table, String primaryKey) → Future< Map< String, dynamic> ?> -
Finds a user by ID
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
storeToken(
Map< String, dynamic> tokenData) → Future<Map< String, dynamic> > -
Stores a token in the database
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited