From 2bb574e62b1286403afaeb93fb7f4763d05c34e6 Mon Sep 17 00:00:00 2001 From: Nick Zana Date: Mon, 15 May 2023 23:24:15 -0400 Subject: [PATCH] fido-common: add enums for credential backup Used in by the authenticator in authenticator::Data to convey information about the backup state of credentials. --- crates/fido-common/src/credential/mod.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/fido-common/src/credential/mod.rs b/crates/fido-common/src/credential/mod.rs index b814f65..c4d15c1 100644 --- a/crates/fido-common/src/credential/mod.rs +++ b/crates/fido-common/src/credential/mod.rs @@ -16,3 +16,15 @@ pub enum Type { #[cfg_attr(feature = "serde", serde(rename = "public-key"))] PublicKey, } + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum BackupState { + BackedUp = 0b0, + NotBackedUp = 0b1, +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum BackupEligibility { + Eligible, + Ineligible, +}