Allow executing program to retrieve credentials

* config / authentication: permit to call external program for getting credentials

You can add into your ncspot/config.toml like this:

```
creds_username = "mylogin"
creds_passeval = "pass my_pass_path_to_spot_password"
```

Or using any password manager who send your password.to stdout.
If a newline is detected it will be automatically removed

* Move credential commands into separate structure

Also add an option for a username command

* Document credential commands

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
This commit is contained in:
inemajo
2023-03-01 11:28:11 +01:00
committed by GitHub
parent 3a3d8ae8b4
commit c2e030c2f0
4 changed files with 68 additions and 1 deletions

View File

@@ -93,6 +93,13 @@ pub struct ConfigValues {
pub statusbar_format: Option<String>,
pub library_tabs: Option<Vec<LibraryTab>>,
pub hide_display_names: Option<bool>,
pub credentials: Option<Credentials>,
}
#[derive(Serialize, Deserialize, Debug, Default, Clone)]
pub struct Credentials {
pub username_cmd: Option<String>,
pub password_cmd: Option<String>,
}
#[derive(Serialize, Deserialize, Debug, Default, Clone)]