# Module cargo::util::auth

source ·
Expand description

Registry authentication support.

## Structs

- AuthorizationError
  An authorization error from accessing a registry.
- RegistryConfig
  `[registries.NAME]` tables.
- RegistryConfigExtended
  The `[registry]` table, which more keys than the `[registries.NAME]` tables.

## Enums

- AuthorizationErrorReason

## Functions

- auth_token
  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.
- auth_token_optional 🔒
  Returns the token to use for the given registry.
- cache_token_from_commandline
- credential_action 🔒
- credential_provider 🔒
  Get the list of credential providers for a registry source.
- login
  Log in to the given registry.
- logout
  Log out from the given registry.
- registry_credential_config_raw
  Get the credential configuration for a `SourceId`.
- registry_credential_config_raw_uncached 🔒
- resolve_credential_alias 🔒
  Use the `[credential-alias]` table to see if the provider name has been aliased.