From 2d94e043d80ee8b5b2e69b5b09099f991287cae2 Mon Sep 17 00:00:00 2001 From: Lewin Bormann Date: Sat, 22 Jun 2019 22:03:26 +0200 Subject: [PATCH] doc(misc): Add some small missing pieces. --- src/authenticator_delegate.rs | 3 +++ src/service_account.rs | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/authenticator_delegate.rs b/src/authenticator_delegate.rs index 132b511..9c1e22a 100644 --- a/src/authenticator_delegate.rs +++ b/src/authenticator_delegate.rs @@ -108,6 +108,8 @@ pub trait AuthenticatorDelegate: Clone { } } +/// FlowDelegate methods are called when an OAuth flow needs to ask the application what to do in +/// certain cases. pub trait FlowDelegate: Clone { /// Called if the request code is expired. You will have to start over in this case. /// This will be the last call the delegate receives. @@ -192,6 +194,7 @@ pub trait FlowDelegate: Clone { pub struct DefaultAuthenticatorDelegate; impl AuthenticatorDelegate for DefaultAuthenticatorDelegate {} +/// Uses all default implementations in the FlowDelegate trait. #[derive(Clone)] pub struct DefaultFlowDelegate; impl FlowDelegate for DefaultFlowDelegate {} diff --git a/src/service_account.rs b/src/service_account.rs index 6eb4411..7dd3fa8 100644 --- a/src/service_account.rs +++ b/src/service_account.rs @@ -184,7 +184,8 @@ where } /// A token source (`GetToken`) yielding OAuth tokens for services that use ServiceAccount authorization. -/// This token source caches token and automatically renews expired ones. +/// This token source caches token and automatically renews expired ones, meaning you do not need +/// (and you also should not) use this with `Authenticator`. Just use it directly. #[derive(Clone)] pub struct ServiceAccountAccess { client: hyper::Client,