File tree Expand file tree Collapse file tree 7 files changed +59
-0
lines changed
cargo-credential-1password
cargo-credential-gnome-secret
cargo-credential-macos-keychain Expand file tree Collapse file tree 7 files changed +59
-0
lines changed Original file line number Diff line number Diff line change
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.
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ version = "0.1.0"
4
4
authors = [" The Rust Project Developers" ]
5
5
edition = " 2018"
6
6
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."
7
9
8
10
[dependencies ]
9
11
cargo-credential = { path = " ../cargo-credential" }
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ version = "0.1.0"
4
4
authors = [" The Rust Project Developers" ]
5
5
edition = " 2018"
6
6
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."
7
9
8
10
[dependencies ]
9
11
cargo-credential = { path = " ../cargo-credential" }
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ version = "0.1.0"
4
4
authors = [" The Rust Project Developers" ]
5
5
edition = " 2018"
6
6
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."
7
9
8
10
[dependencies ]
9
11
cargo-credential = { path = " ../cargo-credential" }
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ version = "0.1.0"
4
4
authors = [" The Rust Project Developers" ]
5
5
edition = " 2018"
6
6
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."
7
9
8
10
[dependencies ]
9
11
cargo-credential = { path = " ../cargo-credential" }
Original file line number Diff line number Diff line change @@ -4,5 +4,7 @@ version = "0.1.0"
4
4
authors = [" The Rust Project Developers" ]
5
5
edition = " 2018"
6
6
license = " MIT OR Apache-2.0"
7
+ repository = " https://github.com/rust-lang/cargo"
8
+ description = " A library to assist writing Cargo credential helpers."
7
9
8
10
[dependencies ]
Original file line number Diff line number Diff line change
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
+ ```
You can’t perform that action at this time.
0 commit comments