github_auth 0.6.0

Authenticate with GitHub from the command line.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
extern crate github_auth;

use github_auth::{Authenticator, Scope};

fn main() {
  let auth = Authenticator::builder("github_auth main example".into())
    .scope(Scope::PublicRepo)
    .build();

  let token = auth.auth().unwrap();
  println!("{:?}", token);

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