Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(api): use v2 auth for apple pay verified domains (#15117)

Sakil Mostak693f5f5a0461
diff --git a/crates/router/src/routes/verification.rs b/crates/router/src/routes/verification.rs
index 07cba3abde..edf5cfd1d7 100644
--- a/crates/router/src/routes/verification.rs
+++ b/crates/router/src/routes/verification.rs
@@ -116,6 +116,17 @@ pub async fn retrieve_apple_pay_verified_domains(
let merchant_id = &params.merchant_id;
let mca_id = &params.merchant_connector_account_id;
+ #[cfg(feature = "v1")]
+ let api_key_auth = auth::HeaderAuth(auth::ApiKeyAuth {
+ allow_connected_scope_operation: false,
+ allow_platform_self_operation: false,
+ });
+ #[cfg(feature = "v2")]
+ let api_key_auth = auth::V2ApiKeyAuth {
+ allow_connected_scope_operation: false,
+ allow_platform_self_operation: false,
+ };
+
Box::pin(api::server_wrap(
flow,
state,
@@ -145,10 +156,7 @@ pub async fn retrieve_apple_pay_verified_domains(
}
},
auth::auth_type(
- &auth::HeaderAuth(auth::ApiKeyAuth {
- allow_connected_scope_operation: false,
- allow_platform_self_operation: false,
- }),
+ &api_key_auth,
&auth::JWTAuth {
permission: Permission::MerchantAccountRead,
allow_connected: true,