Skip to main content

resolve_token

Function resolve_token 

Source
pub fn resolve_token(
    provider: &str,
    env_var_name: &str,
    config_value: Option<&str>,
) -> Result<SecretString>
Expand description

Resolves an API token from environment or configuration.

Resolution order:

  1. Environment variable (if env_var_name is provided)
  2. Config value (if config_value is provided)
  3. Returns an AuthError

ยงErrors

Returns MktError::AuthError if no token can be resolved from either the environment variable or the config value.