Skip to content

Commit

Permalink
Merge pull request #306 from mshytikov/issue/fix-encoding
Browse files Browse the repository at this point in the history
Fix encoding when creating oAuth token via Metadata Server
  • Loading branch information
yoshidan authored Sep 9, 2024
2 parents 683e702 + 23c50cf commit e905202
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion foundation/auth/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "google-cloud-auth"
version = "0.17.0"
version = "0.17.1"
authors = ["yoshidan <naohiro.y@gmail.com>"]
edition = "2021"
repository = "https://github.com/yoshidan/google-cloud-rust/tree/main/foundation/auth"
Expand Down
4 changes: 2 additions & 2 deletions foundation/auth/src/token_source/compute_token_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
})
Expand Down

0 comments on commit e905202

Please sign in to comment.