feat: Working passkeys storage (#4025)

This commit is contained in:
GeekCorner 2023-11-04 03:08:45 +01:00 committed by GitHub
parent 915496c103
commit 93da5091e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 9 deletions

View File

@ -212,8 +212,7 @@ pub struct CipherData {
Login = 1, Login = 1,
SecureNote = 2, SecureNote = 2,
Card = 3, Card = 3,
Identity = 4, Identity = 4
Fido2Key = 5
*/ */
pub Type: i32, pub Type: i32,
pub Name: String, pub Name: String,
@ -225,7 +224,6 @@ pub struct CipherData {
SecureNote: Option<Value>, SecureNote: Option<Value>,
Card: Option<Value>, Card: Option<Value>,
Identity: Option<Value>, Identity: Option<Value>,
Fido2Key: Option<Value>,
Favorite: Option<bool>, Favorite: Option<bool>,
Reprompt: Option<i32>, Reprompt: Option<i32>,
@ -468,7 +466,6 @@ pub async fn update_cipher_from_data(
2 => data.SecureNote, 2 => data.SecureNote,
3 => data.Card, 3 => data.Card,
4 => data.Identity, 4 => data.Identity,
5 => data.Fido2Key,
_ => err!("Invalid type"), _ => err!("Invalid type"),
}; };

View File

@ -216,7 +216,8 @@ fn config() -> Json<Value> {
// Any feature flags that we want the clients to use // Any feature flags that we want the clients to use
// Can check the enabled ones at: // Can check the enabled ones at:
// https://vault.bitwarden.com/api/config // https://vault.bitwarden.com/api/config
"autofill-v2": true "autofill-v2": true,
"fido2-vault-credentials": true
}, },
"object": "config", "object": "config",
})) }))

View File

@ -29,8 +29,7 @@ db_object! {
Login = 1, Login = 1,
SecureNote = 2, SecureNote = 2,
Card = 3, Card = 3,
Identity = 4, Identity = 4
Fido2key = 5
*/ */
pub atype: i32, pub atype: i32,
pub name: String, pub name: String,
@ -229,7 +228,6 @@ impl Cipher {
"SecureNote": null, "SecureNote": null,
"Card": null, "Card": null,
"Identity": null, "Identity": null,
"Fido2Key": null,
}); });
// These values are only needed for user/default syncs // These values are only needed for user/default syncs
@ -258,7 +256,6 @@ impl Cipher {
2 => "SecureNote", 2 => "SecureNote",
3 => "Card", 3 => "Card",
4 => "Identity", 4 => "Identity",
5 => "Fido2Key",
_ => panic!("Wrong type"), _ => panic!("Wrong type"),
}; };