# Module cargo::util::auth

source ·
Expand description

Registry authentication support.

## Structs

- AuthorizationError
  An authorization error from accessing a registry.
- Footer 🔒
  The footer of an asymmetric token as describe in RFC 3231.
- Message 🔒
  The main body of an asymmetric token as describe in RFC 3231.
- Secret
  A wrapper for values that should not be printed.

## Enums

- Action 🔒
- AuthorizationErrorReason
- Mutation
  A record of what kind of operation is happening that we should generate a token for.

## 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
- login
  Saves the given token.
- logout
  Removes the token for the given registry.
- paserk_public_from_paserk_secret 🔒
  Checks that a secret key is valid, and returns the associated public key in Paserk format.
- registry_credential_config
  Get the credential configuration for a `SourceId`.
- registry_credential_config_inner 🔒
- run_command 🔒
- sysroot_credential 🔒
  Gets the path to the libexec processes in the sysroot.