mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-13 22:50:19 +08:00
Merge branch 'review-pr-595'
This commit is contained in:
+4
@@ -60,11 +60,13 @@ pub(super) fn should_try_same_format_provider_oauth_auth(
|
||||
behavior: &SameFormatProviderRequestBehavior,
|
||||
transport: &GatewayProviderTransportSnapshot,
|
||||
family: LocalSameFormatProviderFamily,
|
||||
provider_api_format: &str,
|
||||
) -> bool {
|
||||
should_try_same_format_provider_oauth_auth_impl(
|
||||
behavior,
|
||||
transport,
|
||||
same_format_provider_family(family),
|
||||
provider_api_format,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -72,11 +74,13 @@ pub(super) fn resolve_same_format_provider_direct_auth(
|
||||
behavior: &SameFormatProviderRequestBehavior,
|
||||
transport: &GatewayProviderTransportSnapshot,
|
||||
family: LocalSameFormatProviderFamily,
|
||||
provider_api_format: &str,
|
||||
) -> Option<(String, String)> {
|
||||
resolve_same_format_provider_direct_auth_impl(
|
||||
behavior,
|
||||
transport,
|
||||
same_format_provider_family(family),
|
||||
provider_api_format,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+12
-3
@@ -92,8 +92,12 @@ pub(super) async fn prepare_local_same_format_provider_candidate(
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let should_try_oauth_auth =
|
||||
should_try_same_format_provider_oauth_auth(&behavior, &transport, spec.family);
|
||||
let should_try_oauth_auth = should_try_same_format_provider_oauth_auth(
|
||||
&behavior,
|
||||
&transport,
|
||||
spec.family,
|
||||
provider_api_format,
|
||||
);
|
||||
let oauth_auth = if should_try_oauth_auth {
|
||||
resolve_candidate_oauth_auth(
|
||||
planner_state,
|
||||
@@ -118,7 +122,12 @@ pub(super) async fn prepare_local_same_format_provider_candidate(
|
||||
{
|
||||
Some((name.clone(), value.clone()))
|
||||
} else {
|
||||
resolve_same_format_provider_direct_auth(&behavior, &transport, spec.family)
|
||||
resolve_same_format_provider_direct_auth(
|
||||
&behavior,
|
||||
&transport,
|
||||
spec.family,
|
||||
provider_api_format,
|
||||
)
|
||||
};
|
||||
let (auth_header, auth_value) = match auth {
|
||||
Some((name, value)) => (Some(name), Some(value)),
|
||||
|
||||
Reference in New Issue
Block a user