# Function cargo::util::auth::asymmetric::public_token_from_credential

source ·

    pub fn public_token_from_credential(
        credential: RegistryCredentialConfig,
        source_id: &SourceId,
        mutation: Option<&Mutation<'_>>
    ) -> CargoResult<Secret<String>>

Expand description

Generates a public token from a registry’s `credential` configuration for authenticating to a `source_id`

An optional `mutation` for authenticating a mutation operation aganist the registry.