-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): Add ability to verify connector credentials before integrating the connector #2986
Conversation
#[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, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the ConnectorAuthType
type from the router
crate if you're re-defining it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making this change will effect a lot of files which are out of scope of this PR. Will be picking this up in a separate PR. This issue tracks it #3018.
Type of Change
Description
This PR adds a new route
/account/connectors/verify
.Additional Changes
Motivation and Context
To enable merchants to test their credentials before integrating the connector.
How did you test it?
Postman.
Checklist
cargo +nightly fmt --all
cargo clippy