1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-08 04:33:38 +00:00

remove old sync method

This commit is contained in:
Anders Åberg
2025-07-07 13:41:43 +02:00
parent 9fa611cb50
commit 22b272e4a3

View File

@@ -61,31 +61,31 @@ pub fn register() -> std::result::Result<(), String> {
thread::sleep(Duration::from_millis(5000));
util::message("sleeping done");
let r = syncCredentials();
util::message(&format!("sync credentials: {:?}", r));
//let r = syncCredentials();
//util::message(&format!("sync credentials: {:?}", r));
if let Err(e) = r {
util::message(&format!("syncCredentials failed: {}", e));
}
//if let Err(e) = r {
// util::message(&format!("syncCredentials failed: {}", e));
//}
Ok(())
}
fn syncCredentials() -> std::result::Result<(), String> {
// Create a test credential using the new sync module with more realistic data
let test_credential = types::SyncedCredential {
credential_id: vec![
0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66,
0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
0x05, 0x06, 0x07, 0x08,
], // 32 byte credential ID
rp_id: "webauthn.io".to_string(),
user_name: "testuser".to_string(),
user_handle: vec![0x75, 0x73, 0x65, 0x72, 0x31, 0x32, 0x33, 0x34], // "user1234" as bytes
};
// fn syncCredentials() -> std::result::Result<(), String> {
// // Create a test credential using the new sync module with more realistic data
// let test_credential = types::SyncedCredential {
// credential_id: vec![
// 0x12, 0x34, 0x56, 0x78, 0x9a, 0xbc, 0xde, 0xf0, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66,
// 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04,
// 0x05, 0x06, 0x07, 0x08,
// ], // 32 byte credential ID
// rp_id: "webauthn.io".to_string(),
// user_name: "testuser".to_string(),
// user_handle: vec![0x75, 0x73, 0x65, 0x72, 0x31, 0x32, 0x33, 0x34], // "user1234" as bytes
// };
let credentials = vec![test_credential];
// let credentials = vec![test_credential];
// Use the sync module to sync credentials
sync_credentials_to_windows(credentials, CLSID)
}
// // Use the sync module to sync credentials
// sync_credentials_to_windows(credentials, CLSID)
// }