Make work with new structure after rebase

This commit is contained in:
Lukas Winkler
2021-11-25 16:45:26 +01:00
parent 921f1c7190
commit 7818c6a460

View File

@@ -278,9 +278,7 @@ impl ApplicationDefaultCredentialsAuthenticator {
/// to provide tokens.
pub fn from_instance_metadata(
) -> AuthenticatorBuilder<DefaultHyperClient, ApplicationDefaultCredentialsFlowOpts> {
AuthenticatorBuilder::<DefaultHyperClient, _>::with_auth_flow(
ApplicationDefaultCredentialsFlowOpts {},
)
AuthenticatorBuilder::new(ApplicationDefaultCredentialsFlowOpts {}, DefaultHyperClient)
}
/// Use modified builder pattern to create an Authenticator that pulls default application credentials
@@ -292,12 +290,14 @@ impl ApplicationDefaultCredentialsAuthenticator {
crate::read_service_account_key(std::env::var("GOOGLE_APPLICATION_CREDENTIALS")?)
.await
.unwrap();
Ok(
AuthenticatorBuilder::<DefaultHyperClient, _>::with_auth_flow(ServiceAccountFlowOpts {
Ok(AuthenticatorBuilder::new(
ServiceAccountFlowOpts {
key: service_account_key,
subject: None,
}),
)
},
DefaultHyperClient,
))
}
/// Use the builder pattern to deduce which model of authenticator should be used: