Home

Awesome

<div align="center">

🔐 tame-oauth

Embark Embark Crates.io Docs dependency status Build status

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

</div>

Why?

Why not?

Features

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

default_creds

Usage: cargo run --example default_creds -- <scope..>

Attempts to find and use the default credentials to get a token. Note that scopes are not used in all cases as eg. end user credentials only ever have the cloud platform scope.

cargo run --example default_creds -- https://www.googleapis.com/auth/devstorage.read_only

Contributing

Contributor Covenant

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.