Skip to content

Commit

Permalink
Merge pull request #3593 from GeekCornerGH/feature/store-passkeys-in-…
Browse files Browse the repository at this point in the history
…the-vault

feat: Support for storing passkeys in the vault
  • Loading branch information
dani-garcia committed Jun 22, 2023
2 parents c56bf38 + 1074315 commit e7f083d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/api/core/ciphers.rs
Expand Up @@ -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,
Expand All @@ -222,6 +223,7 @@ pub struct CipherData {
SecureNote: Option<Value>,
Card: Option<Value>,
Identity: Option<Value>,
Fido2Key: Option<Value>,

Favorite: Option<bool>,
Reprompt: Option<i32>,
Expand Down Expand Up @@ -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"),
};

Expand Down
5 changes: 4 additions & 1 deletion src/db/models/cipher.rs
Expand Up @@ -27,7 +27,8 @@ db_object! {
Login = 1,
SecureNote = 2,
Card = 3,
Identity = 4
Identity = 4,
Fido2key = 5
*/
pub atype: i32,
pub name: String,
Expand Down Expand Up @@ -223,6 +224,7 @@ impl Cipher {
"SecureNote": null,
"Card": null,
"Identity": null,
"Fido2Key": null,
});

// These values are only needed for user/default syncs
Expand Down Expand Up @@ -251,6 +253,7 @@ impl Cipher {
2 => "SecureNote",
3 => "Card",
4 => "Identity",
5 => "Fido2Key",
_ => panic!("Wrong type"),
};

Expand Down

0 comments on commit e7f083d

Please sign in to comment.