# Function cargo::util::auth::auth_token

source ·

    pub fn auth_token(
        config: &Config,
        sid: &SourceId,
        login_url: Option<&Url>,
        mutation: Option<Mutation<'_>>
    ) -> 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.