diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-03-02 22:13:21 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-03-02 22:13:21 -0500 |
commit | 604e09e6ae098350bffe18bde26e1c62f7e88a00 (patch) | |
tree | ed40c95a683fa200b11dc3f19accca7eee48ccd5 /src/bin/rbw-agent/actions.rs | |
parent | d149a01bffd2bfdd16e471c8be55f7760c70dd69 (diff) | |
download | rbw-604e09e6ae098350bffe18bde26e1c62f7e88a00.tar.gz rbw-604e09e6ae098350bffe18bde26e1c62f7e88a00.zip |
make the pinentry program configurable
Diffstat (limited to 'src/bin/rbw-agent/actions.rs')
-rw-r--r-- | src/bin/rbw-agent/actions.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bin/rbw-agent/actions.rs b/src/bin/rbw-agent/actions.rs index 1a5a3c5..4f4096e 100644 --- a/src/bin/rbw-agent/actions.rs +++ b/src/bin/rbw-agent/actions.rs @@ -32,6 +32,7 @@ pub async fn login( None }; let password = rbw::pinentry::getpin( + &config_pinentry().await?, "Master Password", &format!("Log in to {}", host), err.as_deref(), @@ -134,6 +135,7 @@ async fn two_factor( None }; let code = rbw::pinentry::getpin( + &config_pinentry().await?, "Authenticator App", "Enter the 6 digit verification code from your authenticator app.", err.as_deref(), @@ -293,6 +295,7 @@ pub async fn unlock( None }; let password = rbw::pinentry::getpin( + &config_pinentry().await?, "Master Password", "Unlock the local database", err.as_deref(), @@ -532,3 +535,8 @@ async fn config_base_url() -> anyhow::Result<String> { let config = rbw::config::Config::load_async().await?; Ok(config.base_url()) } + +async fn config_pinentry() -> anyhow::Result<String> { + let config = rbw::config::Config::load_async().await?; + Ok(config.pinentry) +} |