Persistence boundary for RFC 8628 device authorization transactions.
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
-
approve(
String userCodeHash, String userId, {DateTime? now}) → FutureOr< AuthDeviceAuthorization?> -
Atomically approves a pending request for
userId. -
beginIssuance(
String deviceCodeHash, {required String clientId, required String leaseDigest, required DateTime leaseExpiresAt, DateTime? now}) → FutureOr< AuthDeviceAuthorizationIssuanceLeaseResult> - Atomically acquires a bounded issuance lease for an approved request.
-
completeIssuance(
String deviceCodeHash, {required String clientId, required String leaseDigest, DateTime? now}) → FutureOr< bool> -
Atomically consumes the request only when
leaseDigeststill owns it. -
create(
AuthDeviceAuthorization authorization) → FutureOr< AuthDeviceAuthorization> -
Validates and creates
authorization, rejecting duplicate code digests. -
deleteForUser(
String userId) → FutureOr< void> -
Deletes all device authorizations whose user ID matches
userId. -
deny(
String userCodeHash, {DateTime? now}) → FutureOr< AuthDeviceAuthorization?> - Atomically denies a pending request.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
poll(
String deviceCodeHash, {DateTime? now}) → FutureOr< AuthDeviceAuthorizationPollResult> - Atomically records a poll and enforces the current polling interval.
-
releaseIssuance(
String deviceCodeHash, {required String clientId, required String leaseDigest, DateTime? now}) → FutureOr< bool> - Releases only the matching lease after an issuer failure.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited