Crates.io | tame-oauth |
lib.rs | tame-oauth |
version | 0.10.0 |
source | src |
created_at | 2019-07-02 12:42:34.549858 |
updated_at | 2024-03-21 07:27:04.385752 |
description | A (very) simple oauth 2.0 library |
homepage | https://github.com/EmbarkStudios/tame-oauth |
repository | https://github.com/EmbarkStudios/tame-oauth |
max_upload_size | |
id | 145407 |
size | 157,302 |
gcp
(default) - Support for GCP oauth2wasm-web
- Enables wasm features in ring
needed for tame-oauth
to be used in a wasm browser context. Note this feature should not be used when targeting wasm outside the browser context, in which case you would likely need to target wasm32-wasi
.jwt
(default) - Support for JSON Web Tokens, required for gcp
url
(default) - Url parsing, required for gcp
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
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
We welcome community contributions to this project.
Please read our Contributor Guide for more information on how to get started.
Licensed under either of
at your option.
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.