Skip to main content

store_secret

Function store_secret 

Source
async fn store_secret(
    identity_store: &Arc<Store>,
    account_id: &str,
    req: &VerifyKeyReq,
    existing: Option<&IdentityAccount>,
) -> Result<StoredSecret, String>
Expand description

Where the key is kept: a key added to a new account goes into the Vault, as an api-key entry the account row points at. An account that already keeps its key in the OS keychain keeps it there (a replaced key goes to the same place), and one whose Vault entry is gone gets a new entry. Both are blocking (the keychain’s sync D-Bus on Linux, the Vault’s database), so they run off the async runtime worker. Returns the pointer and whether a new entry was created.