Skip to main content

resolve_token

Function resolve_token 

Source
pub fn resolve_token(token_file: Option<&Path>) -> Result<String>
Expand description

Resolves the session token, in priority order:

  1. --token-file — read its trimmed contents. On Unix the file must be 0600 (owner-only) or resolution fails closed.
  2. OMNI_BRIDGE_TOKEN — read from the environment.
  3. Otherwise a fresh token is generated.

The token is never accepted from argv.