mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
feat(core): Add ability to verify connector credentials before integrating the connector (#2986)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use common_utils::{
|
||||
crypto::{Encryptable, OptionalEncryptableName},
|
||||
pii,
|
||||
@ -614,6 +616,36 @@ pub struct MerchantConnectorCreate {
|
||||
pub status: Option<api_enums::ConnectorStatus>,
|
||||
}
|
||||
|
||||
// Different patterns of authentication.
|
||||
#[derive(Default, Debug, Clone, serde::Deserialize, serde::Serialize)]
|
||||
#[serde(tag = "auth_type")]
|
||||
pub enum ConnectorAuthType {
|
||||
TemporaryAuth,
|
||||
HeaderKey {
|
||||
api_key: Secret<String>,
|
||||
},
|
||||
BodyKey {
|
||||
api_key: Secret<String>,
|
||||
key1: Secret<String>,
|
||||
},
|
||||
SignatureKey {
|
||||
api_key: Secret<String>,
|
||||
key1: Secret<String>,
|
||||
api_secret: Secret<String>,
|
||||
},
|
||||
MultiAuthKey {
|
||||
api_key: Secret<String>,
|
||||
key1: Secret<String>,
|
||||
api_secret: Secret<String>,
|
||||
key2: Secret<String>,
|
||||
},
|
||||
CurrencyAuthKey {
|
||||
auth_key_map: HashMap<common_enums::Currency, pii::SecretSerdeValue>,
|
||||
},
|
||||
#[default]
|
||||
NoKey,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct MerchantConnectorWebhookDetails {
|
||||
|
||||
Reference in New Issue
Block a user