InMemoryAuthDeviceAuthorizationStore class final

In-memory device authorization store for tests and local development.

Implemented types

Constructors

InMemoryAuthDeviceAuthorizationStore({int maxEntries = 1024})
Creates a bounded reference store for tests and local development.

Properties

hashCode → int
The hash code for this object.
no setterinherited
maxEntries → int
Maximum number of unexpired records retained in memory.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

approve(String userCodeHash, String userId, {DateTime? now}) → Future<AuthDeviceAuthorization?>
Transitions one pending, unexpired record to approved.
override
beginIssuance(String deviceCodeHash, {required String clientId, required String leaseDigest, required DateTime leaseExpiresAt, DateTime? now}) → Future<AuthDeviceAuthorizationIssuanceLeaseResult>
Acquires a client-bound lease for an approved record.
override
captureDeletionState() → Object
Captures a checkpoint for coordinated deletion rollback.
override
completeIssuance(String deviceCodeHash, {required String clientId, required String leaseDigest, DateTime? now}) → Future<bool>
Marks a record consumed when the active lease owner completes issuance.
override
create(AuthDeviceAuthorization authorization) → Future<AuthDeviceAuthorization>
Validates and stores a record, pruning expired entries first.
override
deleteForUser(String userId) → Future<void>
Removes all records whose approved user matches userId.
override
deleteUserDataForDeletion(String userId) → Future<void>
Adapts deleteForUser to the deletion coordinator contract.
override
deny(String userCodeHash, {DateTime? now}) → Future<AuthDeviceAuthorization?>
Transitions one pending, unexpired record to denied.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
poll(String deviceCodeHash, {DateTime? now}) → Future<AuthDeviceAuthorizationPollResult>
Polls a record using UTC time and updates its last-poll timestamp.
override
releaseIssuance(String deviceCodeHash, {required String clientId, required String leaseDigest, DateTime? now}) → Future<bool>
Clears an active lease after a failed token issuance.
override
restoreDeletionState(Object checkpoint) → void
Restores a checkpoint produced by captureDeletionState.
override
toString() → String
A string representation of this object.
inherited

Operators

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