fix: service_account feature flag placement

This commit is contained in:
Federico Cergol
2022-03-09 18:31:10 +01:00
parent b4c5ef8527
commit e9cb1e43eb
4 changed files with 14 additions and 7 deletions

View File

@@ -386,7 +386,12 @@ impl AuthorizedUserAuthenticator {
authorized_user_secret: AuthorizedUserSecret,
client: C,
) -> AuthenticatorBuilder<C, AuthorizedUserFlow> {
AuthenticatorBuilder::new(AuthorizedUserFlow { secret: authorized_user_secret }, client)
AuthenticatorBuilder::new(
AuthorizedUserFlow {
secret: authorized_user_secret,
},
client,
)
}
}

View File

@@ -66,4 +66,4 @@ impl AuthorizedUserFlow {
log::debug!("received response; head: {:?}, body: {:?}", head, body);
TokenInfo::from_json(&body)
}
}
}

View File

@@ -4,9 +4,11 @@
// Copyright (c) 2016 Google Inc (lewinb@google.com).
//
// Refer to the project root for licensing information.
#[cfg(feature = "service_account")]
use crate::authorized_user::AuthorizedUserSecret;
use crate::types::{ApplicationSecret, ConsoleApplicationSecret};
use crate::{authorized_user::AuthorizedUserSecret, service_account::ServiceAccountKey};
#[cfg(feature = "service_account")]
use crate::service_account::ServiceAccountKey;
use std::io;
use std::path::Path;

View File

@@ -91,13 +91,13 @@ pub mod storage;
mod types;
#[cfg(feature = "service_account")]
pub use crate::authenticator::ServiceAccountAuthenticator;
#[doc(inline)]
pub use crate::authenticator::{
ApplicationDefaultCredentialsAuthenticator, AuthorizedUserAuthenticator,
DeviceFlowAuthenticator, InstalledFlowAuthenticator
DeviceFlowAuthenticator, InstalledFlowAuthenticator,
};
#[cfg(feature = "service_account")]
pub use crate::authenticator::ServiceAccountAuthenticator;
pub use crate::helper::*;
pub use crate::installed::InstalledFlowReturnMethod;