fix(router): add validation for all the connector auth type (#1748)

This commit is contained in:
Amisha Prabhat
2023-07-27 11:54:16 +05:30
committed by GitHub
parent 7607b6b671
commit 1cda7ad5fc
52 changed files with 411 additions and 23 deletions

View File

@ -81,6 +81,14 @@ impl ConnectorCommon for Trustpay {
"application/x-www-form-urlencoded"
}
fn validate_auth_type(
&self,
val: &types::ConnectorAuthType,
) -> Result<(), error_stack::Report<errors::ConnectorError>> {
trustpay::TrustpayAuthType::try_from(val)?;
Ok(())
}
fn base_url<'a>(&self, connectors: &'a settings::Connectors) -> &'a str {
connectors.trustpay.base_url.as_ref()
}