bitwarden_importers/importers/onepassword/access/credentials.rs
1//! The credentials a password login needs.
2
3use zeroize::Zeroize;
4
5use super::sign_in::SignInAddress;
6
7/// The credentials for a password + Secret Key login.
8///
9/// Deliberately not `Debug`: it holds the master password and Secret Key.
10#[derive(Clone)]
11pub struct Credentials {
12 /// The account's email address.
13 pub username: String,
14 /// The account's master password.
15 pub password: String,
16 /// The account's Secret Key (Account Key), such as `A3-XXXXXX-...`.
17 pub account_key: String,
18 /// Where the account signs in, such as `my.1password.com`.
19 pub sign_in_address: SignInAddress,
20 /// The device id for this import. See `device::generate_device_uuid`.
21 pub device_uuid: String,
22}
23
24impl Drop for Credentials {
25 fn drop(&mut self) {
26 self.password.zeroize();
27 self.account_key.zeroize();
28 }
29}