github_auth 0.4.0

Authenticate with GitHub from the command line.
Documentation

github_auth

crates.io version build status downloads docs.rs docs

Authenticate with GitHub from the command line. Caches the authentication token so that future interactions just work.

Usage

extern crate github_auth;

use github_auth::Authenticator;

let auth = Authenticator::new("my_example_app");
let creds = auth.auth().unwrap();
println!("{:?}", creds);

let location = auth.location();
println!("Token is stored at {:?}", &location);

Example Output

This dialog is only required to generate a valid token. Once a valid token is created, it will no longer be shown.

GitHub username: my_name
GitHub password:
GitHub OTP (optional): 5678

Installation

$ cargo add github_auth

License

MIT OR Apache-2.0