feat(providers): expand OAuth account management

Add Claude Code manual and cookie authorization, including redacted batch tasks. Harden OAuth imports, duplicate replacement, provider dialogs, and related account-management tests.
This commit is contained in:
elky
2026-07-27 15:53:28 +08:00
parent 531cf11025
commit 550cc36760
55 changed files with 4957 additions and 403 deletions
+27 -1
View File
@@ -1,11 +1,12 @@
use crate::core::OAuthError;
use aether_contracts::ResolvedTransportProfile;
use async_trait::async_trait;
use serde_json::Value;
use std::collections::BTreeMap;
use super::OAuthNetworkContext;
#[derive(Debug, Clone, PartialEq)]
#[derive(Clone, PartialEq)]
pub struct OAuthHttpRequest {
pub request_id: String,
pub method: reqwest::Method,
@@ -15,6 +16,31 @@ pub struct OAuthHttpRequest {
pub json_body: Option<Value>,
pub body_bytes: Option<Vec<u8>>,
pub network: OAuthNetworkContext,
pub transport_profile: Option<ResolvedTransportProfile>,
}
impl std::fmt::Debug for OAuthHttpRequest {
fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter
.debug_struct("OAuthHttpRequest")
.field("request_id", &self.request_id)
.field("method", &self.method)
.field("url", &self.url)
.field("header_names", &self.headers.keys().collect::<Vec<_>>())
.field("content_type", &self.content_type)
.field("has_json_body", &self.json_body.is_some())
.field("body_bytes_len", &self.body_bytes.as_ref().map(Vec::len))
.field("network_policy", &self.network.policy)
.field("has_proxy", &self.network.proxy.is_some())
.field(
"transport_profile_id",
&self
.transport_profile
.as_ref()
.map(|profile| profile.profile_id.as_str()),
)
.finish()
}
}
#[derive(Debug, Clone, PartialEq)]