RecoveryKeyState

class RecoveryKeyState(val epoch: Long, val status: RecoveryKeyStatus, publicKey: ByteArray?, val installedAt: Instant?, val transitionedAt: Instant, val rotationId: RecoveryKeyRotationId? = null, val revocationId: RecoveryKeyRevocationId? = null, val resetCompletionId: RecoveryKeyResetCompletionId? = null)

A user's stored recovery key state (docs/recovery-key-lifecycle.md): epoch, the publicKey and its server installation time installedAt (both only while status is RecoveryKeyStatus.ACTIVE), the server time of the last transition transitionedAt (registration, rotation, reset completion or revocation; for a revoked key the revocation time), and the transition that produced this state: rotationId for a rotation, revocationId for a revocation, resetCompletionId for a completed delayed reset, none for a registration. At most one of them is set.

Constructors

Link copied to clipboard
constructor(epoch: Long, status: RecoveryKeyStatus, publicKey: ByteArray?, installedAt: Instant?, transitionedAt: Instant, rotationId: RecoveryKeyRotationId? = null, revocationId: RecoveryKeyRevocationId? = null, resetCompletionId: RecoveryKeyResetCompletionId? = null)

Properties

Link copied to clipboard
val epoch: Long
Link copied to clipboard
Link copied to clipboard

A copy of the active public key, or null when revoked.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun isActive(publicKey: ByteArray, epoch: Long): Boolean

true if this is the ACTIVE key publicKey at epoch: the state a pending reset for them is bound to.

Link copied to clipboard
open override fun toString(): String