3 unstable releases

✓ Uses Rust 2018 edition

0.2.1 Jul 15, 2019
0.2.0 Jul 3, 2019
0.1.0 Jul 2, 2019

#25 in Authentication

Download history 144/week @ 2019-07-01 524/week @ 2019-07-08

231 downloads per month
Used in 2 crates

MIT/Apache

28KB
491 lines

🔐 tame-oauth

Build Status Latest version Docs

tame-oauth is a small oauth crate that follows the sans-io approach.

Why?

  • You want to control how you actually make oauth HTTP requests

Why not?

  • The only auth flow that is currently implemented is the service account flow for GCP. Other flows can be added, but right now that is the only one we need.
  • There are several other oauth crates available that have many more features and are easier to work with, if you don't care about what HTTP clients they use.
  • This crate requires more boilerplate to work with

Examples

svc_account

Usage: cargo run --example svc_account -- <key_path> <scope..>

A small example of using tame-oauth together with reqwest. Given a key file and 1 or more scopes, it will attempt to get a token that you could be used to access resources in those scopes.

cargo run --example svc_account -- ~/.secrets/super-sekret.json https://www.googleapis.com/auth/pubsub https://www.googleapis.com/auth/devstorage.read_only

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~6MB
~124K SLoC