Skip to main content

Module auth

Module auth 

Source
Expand description

Token resolution: CARGO_REGISTRY_TOKENCARGO_REGISTRIES_<NAME>_TOKEN$CARGO_HOME/credentials.toml.

Facade re-exporting the crate-private ops::auth module so external consumers keep using shipper::auth::* after the shipper-auth microcrate absorption.

Structs§

AuthInfo
Result of token resolution for a single registry.

Enums§

TokenSource
Where the authentication token was resolved from.

Constants§

CARGO_HOME_ENV
Environment variable for CARGO_HOME.
CARGO_REGISTRIES_TOKEN_PREFIX
Environment variable prefix for registry-specific tokens.
CARGO_REGISTRY_TOKEN_ENV
Environment variable for the default registry token.
CRATES_IO_REGISTRY
Default registry name for crates.io.
CREDENTIALS_FILE
Default credentials filename inside $CARGO_HOME.

Functions§

cargo_home_path
Resolve the CARGO_HOME directory path.
detect_auth_type
Detect the best-known authentication mode for publish/preflight diagnostics.
has_token
Check whether any token is available for the given registry.
is_trusted_publishing_available
Detect whether trusted publishing (GitHub Actions OIDC) is available.
list_configured_registries
List all registry names found in a credentials.toml file.
mask_token
Mask a token for safe display.
resolve_auth_info
Resolve the authentication token for a registry.
resolve_token
Resolve the authentication token for a registry.