Make helpers that read from disk async

This commit is contained in:
Glenn Griffin
2019-11-21 09:14:30 -08:00
parent 1d25341c66
commit 8e38d3976b
7 changed files with 39 additions and 27 deletions

View File

@@ -3,7 +3,9 @@ use yup_oauth2::ServiceAccountAuthenticator;
#[tokio::main]
async fn main() {
let creds = yup_oauth2::read_service_account_key("serviceaccount.json").unwrap();
let creds = yup_oauth2::read_service_account_key("serviceaccount.json")
.await
.unwrap();
let sa = ServiceAccountAuthenticator::builder(creds)
.build()
.await