Function cargo::util::auth::auth_token
source · pub fn auth_token(
config: &Config,
sid: &SourceId,
login_url: Option<&Url>,
operation: Operation<'_>,
headers: Vec<String>,
require_cred_provider_config: bool
) -> CargoResult<String>
Expand description
Returns the token to use for the given registry.
If a login_url
is provided and a token is not available, the
login_url will be included in the returned error.