Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dermesser/yup-oauth2
An oauth2 client implementation providing the Device, Installed, Service Account, and several more flows.
https://github.com/dermesser/yup-oauth2
authorization google oauth2
Last synced: about 12 hours ago
JSON representation
An oauth2 client implementation providing the Device, Installed, Service Account, and several more flows.
- Host: GitHub
- URL: https://github.com/dermesser/yup-oauth2
- Owner: dermesser
- License: apache-2.0
- Created: 2015-02-26T18:24:54.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-08-06T18:30:14.000Z (3 months ago)
- Last Synced: 2024-11-08T06:19:58.394Z (about 14 hours ago)
- Topics: authorization, google, oauth2
- Language: Rust
- Homepage: https://docs.rs/yup-oauth2/
- Size: 944 KB
- Stars: 222
- Watchers: 8
- Forks: 113
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-rust - yup-oauth2
- awesome-rust-cn - yup-oauth2
- awesome-rust - yup-oauth2 - An oauth2 client implementation providing the Device, Installed and Service Account flows (Libraries / Authentication)
- fucking-awesome-rust - yup-oauth2 - An oauth2 client implementation providing the Device, Installed and Service Account flows (Libraries / Authentication)
- fucking-awesome-rust - yup-oauth2 - An oauth2 client implementation providing the Device, Installed and Service Account flows (Libraries / Authentication)
README
[![Build
Status](https://github.com/dermesser/yup-oauth2/actions/workflows/test.yml/badge.svg)](https://github.com/dermesser/yup-oauth2/actions)
[![crates.io](https://img.shields.io/crates/v/yup-oauth2.svg)](https://crates.io/crates/yup-oauth2)**yup-oauth2** is a utility library which implements several OAuth 2.0 flows. It's mainly used by
[google-apis-rs](https://github.com/Byron/google-apis-rs), to authenticate against Google services.
(However, you're able to use it with raw HTTP requests as well; the flows are implemented as token
sources yielding HTTP Bearer tokens). Note that the newer, asynchronous versions of this crate
(version 4) are not compatible with `google-apis-rs` anymore/at the moment.To use asynchronous APIs with the new yup-oauth2 (from version 4), use the
[`async-google-apis`](https://github.com/dermesser/async-google-apis) code
generator, which generates asynchronous API stubs for Google APIs and other
providers who provide Discovery documents for their REST APIs. (*WARNING*: that
project is still *alpha*-quality. Contributions are welcome)The provider we have been testing the code against is also Google. However, the code itself is
generic, and any OAuth provider behaving like Google will work as well. If you find one that
doesn't, please let us know and/or contribute a fix!### Supported authorization types
* Device flow (user enters code on authorization page)
* Installed application flow (user visits URL, copies code to application, application uses
code to obtain token). Used for services like GMail, Drive, ...
* Service account flow: Non-interactive authorization of server-to-server communication based on
public key cryptography. Used for services like Cloud Pubsub, Cloud Storage, ...## Versions
* Version 1.x for Hyper versions below 12
* Version 2.x for Hyper versions 12 and above
* Version 3.x for historical interest
* Version 4.x for tokio 0.2/0.3
* Version 5.x for tokio 1.0## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)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.[API-docs]: https://docs.rs/yup-oauth2/
[examples]: https://github.com/dermesser/yup-oauth2/tree/master/examples
[auth-usage]: https://raw.githubusercontent.com/dermesser/yup-oauth2/master/examples/auth.rs-usage.gif