mash 4497eeb31a feat(flows): allow custom redirect uri
When implementing AuthenticatorDelegate one might want to change the
redirect_uri to use an authorized domain or just change the way
InstalledFlow works.

Add a redirect_uri method to AuthenticatorDelegate that may be
implemented to define a custom redirect uri if needed.
2019-02-12 16:48:08 +00:00
2015-05-08 11:41:26 +02:00
2019-01-04 12:54:08 -08:00
2017-02-03 06:55:17 +01:00
2016-01-10 21:53:51 -05:00

Build
Status Coverage
Status crates.io

yup-oauth2 is a utility library which implements several OAuth 2.0 flows. It's mainly used by 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).

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 for server-to-server communication based on public key cryptography. Used for services like Cloud Pubsub, Cloud Storage, ...

Usage

Please have a look at the API landing page for all the examples you will ever need.

A simple commandline program which authenticates any scope and prints token information can be found in the examples directory.

The video below shows the auth example in action. It's meant to be used as utility to record all server communication and improve protocol compliance.

usage

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.

Description
No description provided
Readme 996 KiB
Languages
Rust 99.2%
Shell 0.8%