fix: support for apikey auth for native interceptors (#4821)
This commit is contained in:
parent
3f5e7ea9c0
commit
8be8178b05
12 changed files with 404 additions and 11 deletions
3
packages/hoppscotch-agent/src-tauri/Cargo.lock
generated
3
packages/hoppscotch-agent/src-tauri/Cargo.lock
generated
|
|
@ -4020,7 +4020,7 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
|||
[[package]]
|
||||
name = "relay"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/CuriousCorrelation/relay.git#0cab8a64b4c9148c930590f2ad5ad3cc1c6c00ae"
|
||||
source = "git+https://github.com/CuriousCorrelation/relay.git#0a314ed5b71c74349d55f8213d57afbbe55abb87"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"curl",
|
||||
|
|
@ -4041,6 +4041,7 @@ dependencies = [
|
|||
"time",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
"url",
|
||||
"url-escape",
|
||||
"urlencoding",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -204,6 +204,17 @@ dependencies = [
|
|||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "displaydoc"
|
||||
version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_filter"
|
||||
version = "0.1.2"
|
||||
|
|
@ -248,6 +259,15 @@ version = "0.1.1"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
|
||||
|
||||
[[package]]
|
||||
name = "form_urlencoded"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
|
||||
dependencies = [
|
||||
"percent-encoding",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "futures-core"
|
||||
version = "0.3.31"
|
||||
|
|
@ -305,6 +325,145 @@ version = "2.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
|
||||
|
||||
[[package]]
|
||||
name = "icu_collections"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"yoke",
|
||||
"zerofrom",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_locid"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"litemap",
|
||||
"tinystr",
|
||||
"writeable",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_locid_transform"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_locid",
|
||||
"icu_locid_transform_data",
|
||||
"icu_provider",
|
||||
"tinystr",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_locid_transform_data"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e"
|
||||
|
||||
[[package]]
|
||||
name = "icu_normalizer"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_collections",
|
||||
"icu_normalizer_data",
|
||||
"icu_properties",
|
||||
"icu_provider",
|
||||
"smallvec",
|
||||
"utf16_iter",
|
||||
"utf8_iter",
|
||||
"write16",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_normalizer_data"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516"
|
||||
|
||||
[[package]]
|
||||
name = "icu_properties"
|
||||
version = "1.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_collections",
|
||||
"icu_locid_transform",
|
||||
"icu_properties_data",
|
||||
"icu_provider",
|
||||
"tinystr",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_properties_data"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569"
|
||||
|
||||
[[package]]
|
||||
name = "icu_provider"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"icu_locid",
|
||||
"icu_provider_macros",
|
||||
"stable_deref_trait",
|
||||
"tinystr",
|
||||
"writeable",
|
||||
"yoke",
|
||||
"zerofrom",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "icu_provider_macros"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "idna"
|
||||
version = "1.0.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e"
|
||||
dependencies = [
|
||||
"idna_adapter",
|
||||
"smallvec",
|
||||
"utf8_iter",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "idna_adapter"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71"
|
||||
dependencies = [
|
||||
"icu_normalizer",
|
||||
"icu_properties",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "infer"
|
||||
version = "0.16.0"
|
||||
|
|
@ -350,6 +509,12 @@ dependencies = [
|
|||
"vcpkg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "litemap"
|
||||
version = "0.7.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.4.12"
|
||||
|
|
@ -578,6 +743,7 @@ dependencies = [
|
|||
"time",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
"url",
|
||||
"url-escape",
|
||||
"urlencoding",
|
||||
]
|
||||
|
|
@ -660,6 +826,12 @@ dependencies = [
|
|||
"windows-sys 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "stable_deref_trait"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
|
||||
|
||||
[[package]]
|
||||
name = "strum"
|
||||
version = "0.26.3"
|
||||
|
|
@ -693,6 +865,17 @@ dependencies = [
|
|||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "synstructure"
|
||||
version = "0.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "1.0.69"
|
||||
|
|
@ -743,6 +926,16 @@ dependencies = [
|
|||
"time-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tinystr"
|
||||
version = "0.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f"
|
||||
dependencies = [
|
||||
"displaydoc",
|
||||
"zerovec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.42.0"
|
||||
|
|
@ -803,6 +996,17 @@ version = "1.0.14"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
||||
|
||||
[[package]]
|
||||
name = "url"
|
||||
version = "2.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60"
|
||||
dependencies = [
|
||||
"form_urlencoded",
|
||||
"idna",
|
||||
"percent-encoding",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "url-escape"
|
||||
version = "0.1.1"
|
||||
|
|
@ -818,6 +1022,18 @@ version = "2.1.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
|
||||
|
||||
[[package]]
|
||||
name = "utf16_iter"
|
||||
version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246"
|
||||
|
||||
[[package]]
|
||||
name = "utf8_iter"
|
||||
version = "1.0.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
|
||||
|
||||
[[package]]
|
||||
name = "utf8parse"
|
||||
version = "0.2.2"
|
||||
|
|
@ -917,3 +1133,82 @@ name = "windows_x86_64_msvc"
|
|||
version = "0.52.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||
|
||||
[[package]]
|
||||
name = "write16"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936"
|
||||
|
||||
[[package]]
|
||||
name = "writeable"
|
||||
version = "0.5.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
|
||||
|
||||
[[package]]
|
||||
name = "yoke"
|
||||
version = "0.7.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"stable_deref_trait",
|
||||
"yoke-derive",
|
||||
"zerofrom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "yoke-derive"
|
||||
version = "0.7.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"synstructure",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerofrom"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"
|
||||
dependencies = [
|
||||
"zerofrom-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerofrom-derive"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"synstructure",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerovec"
|
||||
version = "0.10.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079"
|
||||
dependencies = [
|
||||
"yoke",
|
||||
"zerofrom",
|
||||
"zerovec-derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerovec-derive"
|
||||
version = "0.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -29,3 +29,4 @@ infer = "0.16.0"
|
|||
strum = { version = "0.26.3", features = ["derive"] }
|
||||
bytes = { version = "1.9.0", features = ["serde"] }
|
||||
mime = "0.3.17"
|
||||
url = "2.5.4"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::collections::HashMap;
|
|||
|
||||
use crate::{
|
||||
error::{RelayError, Result},
|
||||
interop::{AuthType, GrantType, TokenResponse},
|
||||
interop::{ApiKeyLocation, AuthType, GrantType, TokenResponse},
|
||||
};
|
||||
|
||||
pub(crate) struct AuthHandler<'a> {
|
||||
|
|
@ -33,6 +33,10 @@ impl<'a> AuthHandler<'a> {
|
|||
tracing::info!(username = %username, "Setting digest auth");
|
||||
self.set_digest_auth(username, password)
|
||||
}
|
||||
AuthType::ApiKey { key, value, location } => {
|
||||
tracing::info!(key = %key, "Setting API key auth");
|
||||
self.set_apikey_auth(key, value, location)
|
||||
}
|
||||
AuthType::OAuth2 {
|
||||
grant_type,
|
||||
access_token,
|
||||
|
|
@ -85,6 +89,25 @@ impl<'a> AuthHandler<'a> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn set_apikey_auth(&mut self, key: &str, value: &str, location: &ApiKeyLocation) -> Result<()> {
|
||||
tracing::debug!(key = %key, location = ?location, "Setting API key auth");
|
||||
|
||||
match location {
|
||||
ApiKeyLocation::Header => {
|
||||
tracing::debug!("Adding API key as header: {}", key);
|
||||
self.headers.insert(key.to_string(), value.to_string());
|
||||
}
|
||||
ApiKeyLocation::Query => {
|
||||
// For query parameters, we don't need to do anything here
|
||||
// This is handled in the request.rs file before setting the URL
|
||||
tracing::debug!("API key will be added to query parameters in URL");
|
||||
}
|
||||
}
|
||||
|
||||
tracing::debug!("API key auth configured successfully");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn set_digest_auth(&mut self, username: &str, password: &str) -> Result<()> {
|
||||
tracing::debug!("Setting up digest authentication");
|
||||
self.set_basic_auth(username, password)?;
|
||||
|
|
|
|||
|
|
@ -138,6 +138,13 @@ pub enum GrantType {
|
|||
},
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum ApiKeyLocation {
|
||||
Header,
|
||||
Query,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
#[serde(tag = "kind", rename_all = "lowercase")]
|
||||
pub enum AuthType {
|
||||
|
|
@ -164,6 +171,13 @@ pub enum AuthType {
|
|||
cnonce: Option<String>,
|
||||
},
|
||||
#[serde(rename_all = "camelCase")]
|
||||
ApiKey {
|
||||
key: String,
|
||||
value: String,
|
||||
#[serde(rename = "in")]
|
||||
location: ApiKeyLocation,
|
||||
},
|
||||
#[serde(rename_all = "camelCase")]
|
||||
OAuth2 {
|
||||
grant_type: GrantType,
|
||||
access_token: Option<String>,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use crate::{
|
|||
content::ContentHandler,
|
||||
error::{RelayError, Result},
|
||||
header::HeadersBuilder,
|
||||
interop::Request,
|
||||
interop::{ApiKeyLocation, AuthType, Request},
|
||||
security::SecurityHandler,
|
||||
util::ToCurlVersion,
|
||||
};
|
||||
|
|
@ -49,6 +49,50 @@ impl<'a> CurlRequest<'a> {
|
|||
}
|
||||
})?;
|
||||
|
||||
/* NOTE: Once auth handling is correctly migrated over, this is how query param should be handled
|
||||
if let Some(AuthType::ApiKey { key, value, location }) = &self.request.auth {
|
||||
if let ApiKeyLocation::Query = location {
|
||||
tracing::debug!(key = %key, "Adding API key to query parameters");
|
||||
|
||||
let mut url = url::Url::parse(&self.request.url).map_err(|e| {
|
||||
tracing::error!(error = %e, "Failed to parse URL for API key addition");
|
||||
RelayError::Parse {
|
||||
message: "Failed to parse URL for API key addition".into(),
|
||||
cause: Some(e.to_string()),
|
||||
}
|
||||
})?;
|
||||
|
||||
url.query_pairs_mut().append_pair(key, value);
|
||||
let updated_url = url.to_string();
|
||||
tracing::debug!(url = %updated_url, "Updated URL with API key in query parameters");
|
||||
|
||||
self.handle.url(&updated_url).map_err(|e| {
|
||||
tracing::error!(error = %e, "Failed to set URL with API key");
|
||||
RelayError::Network {
|
||||
message: "Failed to set URL with API key".into(),
|
||||
cause: Some(e.to_string()),
|
||||
}
|
||||
})?;
|
||||
} else {
|
||||
self.handle.url(&self.request.url).map_err(|e| {
|
||||
tracing::error!(error = %e, "Failed to set URL");
|
||||
RelayError::Network {
|
||||
message: "Failed to set URL".into(),
|
||||
cause: Some(e.to_string()),
|
||||
}
|
||||
})?;
|
||||
}
|
||||
} else {
|
||||
self.handle.url(&self.request.url).map_err(|e| {
|
||||
tracing::error!(error = %e, "Failed to set URL");
|
||||
RelayError::Network {
|
||||
message: "Failed to set URL".into(),
|
||||
cause: Some(e.to_string()),
|
||||
}
|
||||
})?;
|
||||
}
|
||||
*/
|
||||
|
||||
self.handle
|
||||
.http_version(self.request.version.to_curl_version())
|
||||
.map_err(|e| {
|
||||
|
|
@ -138,6 +182,8 @@ impl<'a> CurlRequest<'a> {
|
|||
if let Some(ref request_headers) = self.request.headers {
|
||||
headers.extend(request_headers.clone());
|
||||
HeadersBuilder::new(self.handle).add_headers(Some(&headers))?;
|
||||
} else if !headers.is_empty() {
|
||||
HeadersBuilder::new(self.handle).add_headers(Some(&headers))?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
|
|||
|
|
@ -2812,7 +2812,7 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
|||
[[package]]
|
||||
name = "relay"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/CuriousCorrelation/relay.git#0cab8a64b4c9148c930590f2ad5ad3cc1c6c00ae"
|
||||
source = "git+https://github.com/CuriousCorrelation/relay.git#0a314ed5b71c74349d55f8213d57afbbe55abb87"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"curl",
|
||||
|
|
@ -2833,6 +2833,7 @@ dependencies = [
|
|||
"time",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
"url",
|
||||
"url-escape",
|
||||
"urlencoding",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -107,6 +107,11 @@ export type AuthType = {
|
|||
};
|
||||
accessToken?: string;
|
||||
refreshToken?: string;
|
||||
} | {
|
||||
kind: "apikey";
|
||||
key: string;
|
||||
value: string;
|
||||
in: "header" | "query";
|
||||
};
|
||||
export type CertificateType = {
|
||||
kind: "pem";
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -159,6 +159,12 @@ export type AuthType =
|
|||
accessToken?: string
|
||||
refreshToken?: string
|
||||
}
|
||||
| {
|
||||
kind: "apikey"
|
||||
key: string
|
||||
value: string
|
||||
in: "header" | "query"
|
||||
}
|
||||
|
||||
export type CertificateType =
|
||||
| {
|
||||
|
|
|
|||
5
packages/hoppscotch-desktop/src-tauri/Cargo.lock
generated
5
packages/hoppscotch-desktop/src-tauri/Cargo.lock
generated
|
|
@ -3956,7 +3956,7 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
|||
[[package]]
|
||||
name = "relay"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/CuriousCorrelation/relay.git#0cab8a64b4c9148c930590f2ad5ad3cc1c6c00ae"
|
||||
source = "git+https://github.com/CuriousCorrelation/relay.git#0a314ed5b71c74349d55f8213d57afbbe55abb87"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"curl",
|
||||
|
|
@ -3977,6 +3977,7 @@ dependencies = [
|
|||
"time",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
"url",
|
||||
"url-escape",
|
||||
"urlencoding",
|
||||
]
|
||||
|
|
@ -5080,7 +5081,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "tauri-plugin-relay"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/CuriousCorrelation/tauri-plugin-relay#bbf25139962fd59b6e0c09f2a8034df29ac10bdf"
|
||||
source = "git+https://github.com/CuriousCorrelation/tauri-plugin-relay#40371f227b75f13dfe1e03273b119326070f6306"
|
||||
dependencies = [
|
||||
"relay",
|
||||
"serde",
|
||||
|
|
|
|||
|
|
@ -1180,7 +1180,7 @@ importers:
|
|||
dependencies:
|
||||
'@hoppscotch/plugin-relay':
|
||||
specifier: github:CuriousCorrelation/tauri-plugin-relay
|
||||
version: '@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/bbf25139962fd59b6e0c09f2a8034df29ac10bdf'
|
||||
version: '@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/40371f227b75f13dfe1e03273b119326070f6306'
|
||||
'@tauri-apps/api':
|
||||
specifier: 2.1.1
|
||||
version: 2.1.1
|
||||
|
|
@ -1809,8 +1809,8 @@ packages:
|
|||
resolution: {tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/e44d90aefb8d930044643b41fa1ce739e49d456c}
|
||||
version: 0.1.0
|
||||
|
||||
'@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/bbf25139962fd59b6e0c09f2a8034df29ac10bdf':
|
||||
resolution: {tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/bbf25139962fd59b6e0c09f2a8034df29ac10bdf}
|
||||
'@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/40371f227b75f13dfe1e03273b119326070f6306':
|
||||
resolution: {tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/40371f227b75f13dfe1e03273b119326070f6306}
|
||||
version: 0.1.0
|
||||
|
||||
'@alloc/quick-lru@5.2.0':
|
||||
|
|
@ -13236,7 +13236,7 @@ snapshots:
|
|||
dependencies:
|
||||
'@tauri-apps/api': 2.1.1
|
||||
|
||||
'@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/bbf25139962fd59b6e0c09f2a8034df29ac10bdf':
|
||||
'@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/40371f227b75f13dfe1e03273b119326070f6306':
|
||||
dependencies:
|
||||
'@tauri-apps/api': 2.1.1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue