Persistence contract for API keys.
- Implementers
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
-
create(
AuthApiKeyRecord record) → FutureOr< AuthApiKeyRecord> - Creates a key. Implementations must enforce unique key IDs atomically.
-
deleteForUser(
String userId) → FutureOr< void> -
Removes every API key owned by
userIdas part of account deletion. -
findById(
String id) → FutureOr< AuthApiKeyRecord?> -
listForUser(
String userId) → FutureOr< List< AuthApiKeyRecord> > -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
revokeForUser(
String userId, String id, {DateTime? revokedAt}) → FutureOr< AuthApiKeyRecord?> -
Revokes a key only when it belongs to
userId. -
rotateForUser(
{required String userId, required String id, required AuthApiKeyRecord replacement, DateTime? revokedAt}) → FutureOr< AuthApiKeyRecord?> -
Atomically revokes the old key and creates
replacement. -
toString(
) → String -
A string representation of this object.
inherited
-
touchIfActive(
String id, DateTime lastUsedAt) → FutureOr< AuthApiKeyRecord?> - Touches an active key and returns the updated record atomically.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited