mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2026-02-02 06:51:23 +01:00
docs(README): Add short information about supported flows
This commit is contained in:
committed by
Sebastian Thiel
parent
0c1a7e7c14
commit
317e6364a5
42
README.md
42
README.md
@@ -1,37 +1,49 @@
|
||||
[](https://travis-ci.org/Byron/yup-oauth2)
|
||||
[](https://coveralls.io/github/Byron/yup-oauth2?branch=master)
|
||||
[](https://travis-ci.org/Byron/yup-oauth2)
|
||||
[](https://coveralls.io/github/Byron/yup-oauth2?branch=master)
|
||||
|
||||
**yup-oauth2** is a utility library which will implement [oauthv2 device authentication](https://developers.google.com/youtube/v3/guides/authentication#devices) suitable for [**yup**](https://github.com/Byron/yup) to work.
|
||||
**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).
|
||||
|
||||
It is implemented such that it makes no assumptions about the front-end, allowing more uses than just in yup.
|
||||
### 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][API-docs] 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][examples].
|
||||
A simple commandline program which authenticates any scope and prints token information can be found
|
||||
in [the examples directory][examples].
|
||||
|
||||
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.
|
||||
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][auth-usage]
|
||||
|
||||
[API-docs]: http://byron.github.io/yup-oauth2
|
||||
[examples]: https://github.com/Byron/yup-oauth2/tree/master/examples
|
||||
[auth-usage]: https://raw.githubusercontent.com/Byron/yup-oauth2/master/examples/auth.rs-usage.gif
|
||||
|
||||
[API-docs]: http://byron.github.io/yup-oauth2 [examples]:
|
||||
https://github.com/Byron/yup-oauth2/tree/master/examples [auth-usage]:
|
||||
https://raw.githubusercontent.com/Byron/yup-oauth2/master/examples/auth.rs-usage.gif
|
||||
|
||||
## License
|
||||
|
||||
Licensed under either of
|
||||
|
||||
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
||||
* 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.
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user