refactor(dynamic_routing): update the authentication for update config to include JWT type (#6785)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Prajjwal Kumar
2024-12-18 14:28:11 +05:30
committed by GitHub
parent 03c71ea366
commit db51ec43bc
4 changed files with 282 additions and 5 deletions

View File

@ -1071,7 +1071,7 @@ pub async fn success_based_routing_update_configs(
flow,
state,
&req,
routing_payload_wrapper,
routing_payload_wrapper.clone(),
|state, _, wrapper: routing_types::SuccessBasedRoutingPayloadWrapper, _| async {
Box::pin(routing::success_based_routing_update_configs(
state,
@ -1081,7 +1081,14 @@ pub async fn success_based_routing_update_configs(
))
.await
},
&auth::AdminApiAuth,
auth::auth_type(
&auth::HeaderAuth(auth::ApiKeyAuth),
&auth::JWTAuthProfileFromRoute {
profile_id: routing_payload_wrapper.profile_id,
required_permission: Permission::ProfileRoutingWrite,
},
req.headers(),
),
api_locking::LockAction::NotApplicable,
))
.await