Skip to content

Commit

Permalink
Merge pull request #536 from paolobarbolini/yup-oauth2-v12
Browse files Browse the repository at this point in the history
Upgrade yup-oauth2 to v12
  • Loading branch information
Byron authored Feb 1, 2025
2 parents 68c883e + 493435b commit 77b4705
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion google-apis-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ serde_json = "1"
serde_with = "3"
tokio = { version = "1", features = ["time"] }
url = "2"
yup-oauth2 = { version = "11", optional = true }
yup-oauth2 = { version = "12", optional = true }
2 changes: 1 addition & 1 deletion google-apis-common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ impl Read for MultiPartReader<'_> {
}

write!(encoded_headers, "{}: {}", k, v.to_str().unwrap())
.map_err(|err| std::io::Error::other(err))?;
.map_err(std::io::Error::other)?;
}

let mut c = Cursor::new(Vec::<u8>::new());
Expand Down
2 changes: 1 addition & 1 deletion google-clis-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ mime = "0.3"
serde = "1"
serde_json = "1"
strsim = "0.11"
yup-oauth2 = "11"
yup-oauth2 = "12"
2 changes: 1 addition & 1 deletion src/generator/templates/Cargo.toml.mako
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ tokio = { version = "1", features = ["full"] }
% endif
url = "2"
utoipa = { version = "4", optional = true }
yup-oauth2 = { version = "11", optional = true }
yup-oauth2 = { version = "12", optional = true }
google-apis-common = { path = "../../google-apis-common", version = "7" }
% if cargo.get('is_executable'):
Expand Down
4 changes: 3 additions & 1 deletion src/generator/templates/cli/lib/engine.mako
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ where
let auth = yup_oauth2::InstalledFlowAuthenticator::with_client(
secret,
yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
hyper_util::client::legacy::Client::builder(executor).build(connector),
yup_oauth2::client::CustomHyperClientBuilder::from(
hyper_util::client::legacy::Client::builder(executor).build(connector),
),
).persist_tokens_to_disk(format!("{}/${util.program_name()}", config_dir)).build().await.unwrap();
<% gpm = gen_global_parameter_names(parameters) %>\
Expand Down

0 comments on commit 77b4705

Please sign in to comment.