From 23c50cfa03654a23d3baecd6b0175e9a0ce281fb Mon Sep 17 00:00:00 2001 From: Max Shytikov Date: Fri, 6 Sep 2024 14:06:40 +0000 Subject: [PATCH] Fix encoding --- foundation/auth/Cargo.toml | 2 +- foundation/auth/src/token_source/compute_token_source.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/foundation/auth/Cargo.toml b/foundation/auth/Cargo.toml index 28be3baf..403491fe 100644 --- a/foundation/auth/Cargo.toml +++ b/foundation/auth/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "google-cloud-auth" -version = "0.17.0" +version = "0.17.1" authors = ["yoshidan "] edition = "2021" repository = "https://github.com/yoshidan/google-cloud-rust/tree/main/foundation/auth" diff --git a/foundation/auth/src/token_source/compute_token_source.rs b/foundation/auth/src/token_source/compute_token_source.rs index 081c2721..1b0530d3 100644 --- a/foundation/auth/src/token_source/compute_token_source.rs +++ b/foundation/auth/src/token_source/compute_token_source.rs @@ -24,9 +24,9 @@ impl ComputeTokenSource { Ok(ComputeTokenSource { token_url: format!( - "http://{}/computeMetadata/v1/instance/service-accounts/default/token?{}", + "http://{}/computeMetadata/v1/instance/service-accounts/default/token?scopes={}", host, - encode(format!("scopes={scope}").as_str()) + encode(scope) ), client: default_http_client(), })