Skip to content

Commit 69c5af8

Browse files
committed
Add some credential manifest metadata and READMEs.
1 parent 37e9c77 commit 69c5af8

File tree

7 files changed

+59
-0
lines changed

7 files changed

+59
-0
lines changed

crates/credential/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Cargo Credential Packages
2+
3+
This directory contains Cargo packages for handling storage of tokens in a
4+
secure manner.
5+
6+
`cargo-credential` is a generic library to assist writing a credential
7+
process. The other directories contain implementations that integrate with
8+
specific credential systems.

crates/credential/cargo-credential-1password/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ version = "0.1.0"
44
authors = ["The Rust Project Developers"]
55
edition = "2018"
66
license = "MIT OR Apache-2.0"
7+
repository = "https://github.com/rust-lang/cargo"
8+
description = "A Cargo credential process that stores tokens in a 1password vault."
79

810
[dependencies]
911
cargo-credential = { path = "../cargo-credential" }

crates/credential/cargo-credential-gnome-secret/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ version = "0.1.0"
44
authors = ["The Rust Project Developers"]
55
edition = "2018"
66
license = "MIT OR Apache-2.0"
7+
repository = "https://github.com/rust-lang/cargo"
8+
description = "A Cargo credential process that stores tokens with GNOME libsecret."
79

810
[dependencies]
911
cargo-credential = { path = "../cargo-credential" }

crates/credential/cargo-credential-macos-keychain/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ version = "0.1.0"
44
authors = ["The Rust Project Developers"]
55
edition = "2018"
66
license = "MIT OR Apache-2.0"
7+
repository = "https://github.com/rust-lang/cargo"
8+
description = "A Cargo credential process that stores tokens in a macOS keychain."
79

810
[dependencies]
911
cargo-credential = { path = "../cargo-credential" }

crates/credential/cargo-credential-wincred/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ version = "0.1.0"
44
authors = ["The Rust Project Developers"]
55
edition = "2018"
66
license = "MIT OR Apache-2.0"
7+
repository = "https://github.com/rust-lang/cargo"
8+
description = "A Cargo credential process that stores tokens with Windows Credential Manager."
79

810
[dependencies]
911
cargo-credential = { path = "../cargo-credential" }

crates/credential/cargo-credential/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ version = "0.1.0"
44
authors = ["The Rust Project Developers"]
55
edition = "2018"
66
license = "MIT OR Apache-2.0"
7+
repository = "https://github.com/rust-lang/cargo"
8+
description = "A library to assist writing Cargo credential helpers."
79

810
[dependencies]
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# cargo-credential
2+
3+
This package is a library to assist writing a Cargo credential helper, which
4+
provides an interface to store tokens for authorizing access to a registry
5+
such as https://crates.io/.
6+
7+
Documentation about credential processes may be found at
8+
https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#credential-process
9+
10+
Example implementations may be found at
11+
https://github.com/rust-lang/cargo/tree/master/crates/credential
12+
13+
## Usage
14+
15+
Create a Cargo project with this as a dependency:
16+
17+
```toml
18+
# Add this to your Cargo.toml:
19+
20+
[dependencies]
21+
cargo-credential = "0.1"
22+
```
23+
24+
And then include a `main.rs` binary which implements the `Credential` trait, and calls
25+
the `main` function which will call the appropriate method of the trait:
26+
27+
```rust
28+
// src/main.rs
29+
30+
use cargo_credential::{Credential, Error};
31+
32+
struct MyCredential;
33+
34+
impl Credential for MyCredential {
35+
/// implement trait methods here...
36+
}
37+
38+
fn main() {
39+
cargo_credential::main(MyCredential);
40+
}
41+
```

0 commit comments

Comments
 (0)