From 69c43287e72dbd5d40b5a7d384cf2c77b66aa714 Mon Sep 17 00:00:00 2001 From: Lewin Bormann Date: Wed, 28 Sep 2016 21:19:43 +0200 Subject: [PATCH] docs(crate): Update crate documentation Please regenerate the documentation in `gh-pages`. --- src/lib.rs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5832b82..6b44c59 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,12 +1,9 @@ //! This library can be used to acquire oauth2.0 authentication for services. -//! At the time of writing, only one way of doing so is implemented, the -//! [device flow](https://developers.google.com/youtube/v3/guides/authentication#devices), along -//! with a flow -//! for [refreshing tokens](https://developers.google.com/youtube/v3/guides/authentication#devices) //! //! For your application to use this library, you will have to obtain an application //! id and secret by -//! [following this guide](https://developers.google.com/youtube/registering_an_application). +//! [following this guide](https://developers.google.com/youtube/registering_an_application) (for +//! Google services) respectively the documentation of the API provider you want to connect to. //! //! # Device Flow Usage //! As the `DeviceFlow` involves polling, the `DeviceFlowHelper` should be used @@ -17,20 +14,25 @@ //! When using service account credentials, no user interaction is required. The access token //! can be obtained automatically using the private key of the client (which you can download //! from the API provider). See `examples/service_account/` for an example on how to use service -//! account credentials. +//! account credentials. See +//! [developers.google.com](https://developers.google.com/identity/protocols/OAuth2ServiceAccount) +//! for a detailed description of the protocol. This crate implements OAuth for Service Accounts +//! based on the Google APIs; it may or may not work with other providers. //! //! # Installed Flow Usage //! The `InstalledFlow` involves showing a URL to the user (or opening it in a browser) //! and then either prompting the user to enter a displayed code, or make the authorizing -//! website redirect to a web server spun up by this library. +//! website redirect to a web server spun up by this library and running on localhost. +//! //! In order to use the interactive method, use the `InstalledInteractive` `FlowType`; //! for the redirect method, use `InstalledRedirect`, with the port number to let the //! server listen on. +//! //! You can implement your own `AuthenticatorDelegate` in order to customize the flow; //! the `InstalledFlow` uses the `present_user_url` method. //! -//! The returned `Token` is stored permanently to authorize future API requests in the -//! same scopes. +//! The returned `Token` is stored permanently in the given token storage in order to +//! authorize future API requests to the same scopes. //! //! ```test_harness,no_run //! #![cfg_attr(feature = "nightly", feature(custom_derive, custom_attribute, plugin))]