Skip to content

Commit

Permalink
Build changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ShivanshMathurJuspay committed Nov 28, 2023
1 parent 977112d commit f3a28b6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions crates/router/src/services/authentication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ impl AuthenticationType {
merchant_id,
key_id: _,
}
| Self::MerchantID { merchant_id }
| Self::MerchantId { merchant_id }
| Self::PublishableKey { merchant_id }
| Self::MerchantJWT {
| Self::MerchantJwt {
merchant_id,
user_id: _,
}
Expand Down Expand Up @@ -352,7 +352,7 @@ where
};
Ok((
auth.clone(),
AuthenticationType::MerchantID {
AuthenticationType::MerchantId {
merchant_id: auth.merchant_account.merchant_id.clone(),
},
))
Expand Down Expand Up @@ -423,7 +423,7 @@ where

Ok((
(),
AuthenticationType::MerchantJWT {
AuthenticationType::MerchantJwt {
merchant_id: payload.merchant_id,
user_id: Some(payload.user_id),
},
Expand Down Expand Up @@ -451,7 +451,7 @@ where
org_id: payload.org_id,
role_id: payload.role_id,
},
AuthenticationType::MerchantJWT {
AuthenticationType::MerchantJwt {
merchant_id: payload.merchant_id,
user_id: Some(payload.user_id),
},
Expand Down Expand Up @@ -479,13 +479,13 @@ where
let permissions = authorization::get_permissions(&payload.role_id)?;
authorization::check_authorization(&self.required_permission, permissions)?;

// Check if token has access to merchantID that has been requested through query param
// Check if token has access to MerchantId that has been requested through query param
if payload.merchant_id != self.merchant_id {
return Err(report!(errors::ApiErrorResponse::InvalidJwtToken));
}
Ok((
(),
AuthenticationType::MerchantJWT {
AuthenticationType::MerchantJwt {
merchant_id: payload.merchant_id,
user_id: Some(payload.user_id),
},
Expand Down Expand Up @@ -549,7 +549,7 @@ where
};
Ok((
auth.clone(),
AuthenticationType::MerchantJWT {
AuthenticationType::MerchantJwt {
merchant_id: auth.merchant_account.merchant_id.clone(),
user_id: None,
},
Expand Down Expand Up @@ -579,7 +579,7 @@ where
org_id: payload.org_id,
role_id: payload.role_id,
},
AuthenticationType::MerchantJWT {
AuthenticationType::MerchantJwt {
merchant_id: payload.merchant_id,
user_id: Some(payload.user_id),
},
Expand Down

0 comments on commit f3a28b6

Please sign in to comment.