Fix auth none

This commit is contained in:
Gregory Schier
2025-05-23 08:43:52 -07:00
parent 31605881ac
commit 4d1dda0786
+10 -2
View File
@@ -226,7 +226,14 @@ pub(crate) async fn connect<R: Runtime>(
); );
} }
if let Some(auth_name) = authentication_type.clone() { match authentication_type {
None => {
// No authentication found. Not even inherited
}
Some(authentication_type) if authentication_type == "none" => {
// Explicitly no authentication
}
Some(authentication_type) => {
let auth = authentication.clone(); let auth = authentication.clone();
let plugin_req = CallHttpAuthenticationRequest { let plugin_req = CallHttpAuthenticationRequest {
context_id: format!("{:x}", md5::compute(request_id.to_string())), context_id: format!("{:x}", md5::compute(request_id.to_string())),
@@ -244,7 +251,7 @@ pub(crate) async fn connect<R: Runtime>(
.collect(), .collect(),
}; };
let plugin_result = let plugin_result =
plugin_manager.call_http_authentication(&window, &auth_name, plugin_req).await?; plugin_manager.call_http_authentication(&window, &authentication_type, plugin_req).await?;
for header in plugin_result.set_headers { for header in plugin_result.set_headers {
headers.insert( headers.insert(
HeaderName::from_str(&header.name).unwrap(), HeaderName::from_str(&header.name).unwrap(),
@@ -252,6 +259,7 @@ pub(crate) async fn connect<R: Runtime>(
); );
} }
} }
}
// TODO: Handle cookies // TODO: Handle cookies
let _cookie_jar = match cookie_jar_id { let _cookie_jar = match cookie_jar_id {