feat(payment_methods_v2): Added Ephemeral auth for v2 (#6813)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sarthak Soni
2024-12-22 23:04:45 +05:30
committed by GitHub
parent 7540b74347
commit 24401bc16f
23 changed files with 688 additions and 126 deletions

View File

@ -90,6 +90,7 @@ pub mod headers {
pub const X_REDIRECT_URI: &str = "x-redirect-uri";
pub const X_TENANT_ID: &str = "x-tenant-id";
pub const X_CLIENT_SECRET: &str = "X-Client-Secret";
pub const X_RESOURCE_TYPE: &str = "X-Resource-Type";
}
pub mod pii {
@ -156,15 +157,17 @@ pub fn mk_app(
}
}
#[cfg(all(feature = "oltp", any(feature = "v1", feature = "v2"),))]
{
server_app = server_app.service(routes::EphemeralKey::server(state.clone()))
}
#[cfg(all(
feature = "oltp",
any(feature = "v1", feature = "v2"),
not(feature = "customer_v2")
))]
{
server_app = server_app
.service(routes::EphemeralKey::server(state.clone()))
.service(routes::Poll::server(state.clone()))
server_app = server_app.service(routes::Poll::server(state.clone()))
}
#[cfg(feature = "olap")]