Skip to content

Commit

Permalink
use httpclient_oauth2 0.1.2 API
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtbuilds committed Dec 25, 2023
1 parent c8876a1 commit abf5d80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libninja/src/rust/cargo_toml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub fn update_cargo_toml(extras: &Extras, opts: &OutputConfig, context: &HashMap
ensure_dependency(&mut m.dependencies, "base64", "0.21.0", &[]);
}
if extras.oauth2 {
ensure_dependency(&mut m.dependencies, "httpclient_oauth2", "0.1.0", &[]);
ensure_dependency(&mut m.dependencies, "httpclient_oauth2", "0.1.2", &[]);
}
m.example = vec![];
fs::write_file(&cargo, &toml::to_string(&m).unwrap())?;
Expand Down
2 changes: 1 addition & 1 deletion libninja/src/rust/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ pub fn impl_Authentication(spec: &HirSpec, opt: &PackageConfig) -> TokenStream {
let oauth2 = spec.oauth2_auth().map(|oauth| {
quote! {
pub fn oauth2(access: String, refresh: String) -> Self {
let mw = shared_oauth2_flow().middleware_from_pieces(access, refresh, httpclient_oauth2::TokenType::Bearer);
let mw = shared_oauth2_flow().bearer_middleware(access, refresh);
Self::OAuth2 { middleware: Arc::new(mw) }
}
}
Expand Down

0 comments on commit abf5d80

Please sign in to comment.