From 1074315a872ee5d5cab808144596fd996bc50f36 Mon Sep 17 00:00:00 2001 From: GeekCornerGH <45696571+GeekCornerGH@users.noreply.github.com> Date: Mon, 19 Jun 2023 09:21:48 +0200 Subject: [PATCH] feat: Support for storing passkeys in the vault --- src/api/core/ciphers.rs | 5 ++++- src/db/models/cipher.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index ea28ad9d02..e465c59706 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -210,7 +210,8 @@ pub struct CipherData { Login = 1, SecureNote = 2, Card = 3, - Identity = 4 + Identity = 4, + Fido2Key = 5 */ pub Type: i32, pub Name: String, @@ -222,6 +223,7 @@ pub struct CipherData { SecureNote: Option, Card: Option, Identity: Option, + Fido2Key: Option, Favorite: Option, Reprompt: Option, @@ -464,6 +466,7 @@ pub async fn update_cipher_from_data( 2 => data.SecureNote, 3 => data.Card, 4 => data.Identity, + 5 => data.Fido2Key, _ => err!("Invalid type"), }; diff --git a/src/db/models/cipher.rs b/src/db/models/cipher.rs index 9e324b7ba5..f76490b4ab 100644 --- a/src/db/models/cipher.rs +++ b/src/db/models/cipher.rs @@ -27,7 +27,8 @@ db_object! { Login = 1, SecureNote = 2, Card = 3, - Identity = 4 + Identity = 4, + Fido2key = 5 */ pub atype: i32, pub name: String, @@ -223,6 +224,7 @@ impl Cipher { "SecureNote": null, "Card": null, "Identity": null, + "Fido2Key": null, }); // These values are only needed for user/default syncs @@ -251,6 +253,7 @@ impl Cipher { 2 => "SecureNote", 3 => "Card", 4 => "Identity", + 5 => "Fido2Key", _ => panic!("Wrong type"), };