AuthTwoFactorTrustedDeviceRecord class

Persisted state for one trusted device.

Constructors

AuthTwoFactorTrustedDeviceRecord({required String id, required String userId, required String tokenHash, required DateTime createdAt, required DateTime expiresAt, DateTime? lastUsedAt, DateTime? revokedAt})
Creates persisted state for one trusted device.

Properties

createdAt → DateTime
Time at which the trusted device was issued.
final
expiresAt → DateTime
Time at which the trusted device expires.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Stable identifier for this trusted-device record.
final
lastUsedAt → DateTime?
Most recent successful use, when one has occurred.
final
revokedAt → DateTime?
Revocation time, or null while the device is not revoked.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tokenHash → String
Digest of the bearer token.
final
userId → String
User who owns the trusted device.
final

Methods

copyWith({DateTime? lastUsedAt, DateTime? revokedAt}) → AuthTwoFactorTrustedDeviceRecord
Creates a record with selected mutable fields replaced.
isActive({DateTime? now}) → bool
Returns whether the device is neither revoked nor expired.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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