mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-07-11 15:22:54 +02:00
Fix auth none
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user