mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-08-23 11:13:20 +00:00
feat: Push Notifications
Co-authored-by: samb-devel <125741162+samb-devel@users.noreply.github.com> Co-authored-by: Zoruk <Zoruk@users.noreply.github.com>
This commit is contained in:
parent
adf67a8ee8
commit
2d66292350
22 changed files with 526 additions and 70 deletions
|
@ -377,6 +377,16 @@ make_config! {
|
|||
/// Websocket port
|
||||
websocket_port: u16, false, def, 3012;
|
||||
},
|
||||
push {
|
||||
/// Enable push notifications
|
||||
push_enabled: bool, false, def, false;
|
||||
/// Push relay base uri
|
||||
push_relay_uri: String, false, def, "https://push.bitwarden.com".to_string();
|
||||
/// Installation id |> The installation id from https://bitwarden.com/host
|
||||
push_installation_id: Pass, false, def, String::new();
|
||||
/// Installation key |> The installation key from https://bitwarden.com/host
|
||||
push_installation_key: Pass, false, def, String::new();
|
||||
},
|
||||
jobs {
|
||||
/// Job scheduler poll interval |> How often the job scheduler thread checks for jobs to run.
|
||||
/// Set to 0 to globally disable scheduled jobs.
|
||||
|
@ -724,6 +734,17 @@ fn validate_config(cfg: &ConfigItems) -> Result<(), Error> {
|
|||
}
|
||||
}
|
||||
|
||||
if cfg.push_enabled && (cfg.push_installation_id == String::new() || cfg.push_installation_key == String::new()) {
|
||||
err!(
|
||||
"Misconfigured Push Notification service\n\
|
||||
########################################################################################\n\
|
||||
# It looks like you enabled Push Notification feature, but didn't configure it #\n\
|
||||
# properly. Make sure the installation id and key from https://bitwarden.com/host are #\n\
|
||||
# added to your configuration. #\n\
|
||||
########################################################################################\n"
|
||||
)
|
||||
}
|
||||
|
||||
if cfg._enable_duo
|
||||
&& (cfg.duo_host.is_some() || cfg.duo_ikey.is_some() || cfg.duo_skey.is_some())
|
||||
&& !(cfg.duo_host.is_some() && cfg.duo_ikey.is_some() && cfg.duo_skey.is_some())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue