Function cargo::util::auth::auth_token
source ยท pub fn auth_token(
gctx: &GlobalContext,
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.