Crate cargo_credential
source ·Expand description
Helper library for writing Cargo credential processes.
A credential process should have a struct that implements the Credential trait.
The main function should be called with an instance of that struct, such as:
ⓘ
fn main() {
cargo_credential::main(MyCredential);
}Modules
- secret 🔒
Structs
- Message sent by the credential helper on startup
- Message sent by Cargo to the credential helper after the hello
- A wrapper for values that should not be printed.
- Credential provider that doesn’t support any registries.
Enums
- Message sent by the credential helper
- A record of what kind of operation is happening that we should generate a token for.
Constants
- Credential process JSON protocol version. Incrementing this version will prevent new credential providers from working with older versions of Cargo.
Traits
Functions
- doit 🔒
- Runs the credential interaction
- Read a line of text from stdin.
- Prompt the user for a token.
- Open stdin from the tty