5 unstable releases

✓ Uses Rust 2018 edition

new 0.3.1 Dec 5, 2019
0.3.0 Oct 10, 2019
0.2.1 Jul 15, 2019
0.2.0 Jul 3, 2019
0.1.0 Jul 2, 2019

#12 in Authentication

Download history 137/week @ 2019-08-22 159/week @ 2019-08-29 139/week @ 2019-09-05 118/week @ 2019-09-12 172/week @ 2019-09-19 70/week @ 2019-09-26 95/week @ 2019-10-03 304/week @ 2019-10-10 149/week @ 2019-10-17 248/week @ 2019-10-24 192/week @ 2019-10-31 185/week @ 2019-11-07 190/week @ 2019-11-14 33/week @ 2019-11-21 142/week @ 2019-11-28

678 downloads per month
Used in 2 crates

MIT/Apache

34KB
486 lines

🔐 tame-oauth

Build Status Latest version Docs Contributor Covenant Embark

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 use.

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 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

Contributing

We welcome community contributions to this project.

Please read our Contributor Guide for more information on how to get started.

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

~2.8–5.5MB
~122K SLoC