Connection re-use for plugin networking and beta NTLM plugin (#295)

This commit is contained in:
Gregory Schier
2025-11-10 14:41:49 -08:00
committed by GitHub
parent d318546d0c
commit 6389fd3b8f
48 changed files with 941 additions and 554 deletions

View File

@@ -6,7 +6,7 @@ use tauri::{Manager, Runtime, WebviewWindow};
use yaak_grpc::{KeyAndValueRef, MetadataMap};
use yaak_models::models::GrpcRequest;
use yaak_models::query_manager::QueryManagerExt;
use yaak_plugins::events::{CallHttpAuthenticationRequest, HttpHeader};
use yaak_plugins::events::{CallHttpAuthenticationRequest, HttpHeader, PluginContext};
use yaak_plugins::manager::PluginManager;
pub(crate) fn metadata_to_map(metadata: MetadataMap) -> BTreeMap<String, String> {
@@ -81,7 +81,12 @@ pub(crate) async fn build_metadata<R: Runtime>(
.collect(),
};
let plugin_result = plugin_manager
.call_http_authentication(&window, &authentication_type, plugin_req)
.call_http_authentication(
&window,
&authentication_type,
plugin_req,
&PluginContext::new(window),
)
.await?;
for header in plugin_result.set_headers.unwrap_or_default() {
metadata.insert(header.name, header.value);