Skip to main content

web_vault_url

Function web_vault_url 

Source
fn web_vault_url(client: &PasswordManagerClient) -> String
Expand description

Resolve the web-vault base URL that /#/send/<access_id>/<url_b64_key> is appended to.

Precedence, mirroring the legacy CLI’s per-service-then-base resolution:

  1. config.web_vault — an explicit web-vault URL (bw config server --web-vault <url>).
  2. config.server — the base server URL (bw config server <url>).
  3. derive from the active client’s api_url (see web_vault_from_api_url).

TODO: this derivation is interim. The CLI has no authoritative source for the web-vault/send host (confirmed with platform in the PM-39239 review), so we infer it. Replace this with a proper environment/config service in this repo (parity with the clients’ DefaultEnvironmentService) once one exists, at which point this becomes a single lookup.