-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat(authentication): added authentication sync api #8596
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
Conversation
…y/hyperswitch into 9455-add-authentication-create-api
…thentication-create-api
…y/hyperswitch into 9948-flatten-existing-core-authentication-function-to-remove-out-of-payments-context
@@ -45,10 +46,6 @@ pub struct AuthenticationCreateRequest { | |||
#[schema(value_type = Option<String>, example = "https://example.com/redirect")] | |||
pub return_url: Option<String>, | |||
|
|||
/// Acquirer details information |
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.
We should have capability to override this per transaction level as well
pub transaction_status: Option<common_enums::TransactionStatus>, | ||
|
||
/// Access Server URL for challenge submission. | ||
pub acs_url: Option<String>, |
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.
why are all the URLs represented as String?
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.
these are values retrieved from table, where it is stored as string, if we want all url to URL type then we would need to parse all the urls, is that required given that its just a state retrieve endpoint
@@ -29,6 +29,7 @@ pub struct MerchantDetails { | |||
pub three_ds_requestor_url: Option<String>, | |||
pub three_ds_requestor_id: Option<String>, | |||
pub three_ds_requestor_name: Option<String>, | |||
pub notification_url: Option<String>, |
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.
this should be URL type right?
@@ -904,6 +918,15 @@ pub async fn authentication_eligibility_core( | |||
) | |||
.await?; | |||
|
|||
let notification_url = match authentication_connector { | |||
common_enums::AuthenticationConnectors::Juspaythreedsserver => Some(format!( |
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.
this logic should be same irrespective of connector right?
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.
incase of ctp, it might differ notification url can also be merchant url
.authentication_connector_details | ||
.and_then(|details| details.three_ds_requestor_app_url), | ||
profile_acquirer_id, | ||
eci: authentication.eci.clone(), |
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.
eci shouldn't be populated if it's client auth right?
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.
eci is not a maskable instrument we can send it to client right?
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.
No, better not to send ECI as well to the client
…hyperswitch into 9947-add-authentication-sync-api
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.
Dashboard specific changes looks fine.
…hyperswitch into 9947-add-authentication-sync-api
…dd-xof-cybersource * 'main' of github.com:juspay/hyperswitch: feat(authentication): added authentication sync api (#8596) feat(connector): [facilitapay] fix refunds, add webhook and void support (#8778) feat(connector): [payload] add recurring payments (#8597) chore(version): 2025.07.31.0 feat(connector): [Flexiti]Add support for flexiti connector (#8743) chore(router): events enhancement for kafka (#8780) ci(cypress): Making a mandate payment with large customer user agents (#8790)
…rver * 'main' of github.com:juspay/hyperswitch: (25 commits) chore: `xof` currency to cybersource cards (#8799) chore(version): 2025.08.01.0 feat(core): Implement UCS based upi for paytm and phonepe (#8732) feat(connector): [katapult]add template code for katapult (#8783) feat(router): introduce `feature` and `feature_data` to gsm (#7771) feat(connector): [cybersource] add changes for field CybersourceConsumerAuthInformation (#8768) feat(authentication): added authentication sync api (#8596) feat(connector): [facilitapay] fix refunds, add webhook and void support (#8778) feat(connector): [payload] add recurring payments (#8597) chore(version): 2025.07.31.0 feat(connector): [Flexiti]Add support for flexiti connector (#8743) chore(router): events enhancement for kafka (#8780) ci(cypress): Making a mandate payment with large customer user agents (#8790) fix(openapi): update create_platform endpoint in api-reference docs (#8782) chore(version): 2025.07.30.0 fix(connector): [GLOBALPAY] Added Tokenization Flow for CITs (#8568) feat(routing): Add api-refs for new decision engine endpoints (#8709) fix: replace xtrim with xdel to support older redis version (#8515) fix(connector): [Worldpay] handle multiple ddc submission for CompleteAuthorize (#8741) feat(connector): [Adyen] receive incoming webhooks for pix expiry (#8720) ...
Type of Change
Description
The main feature is the addition of a new authentication synchronization API that allows syncing authentication data between systems.
API Contract Changes
Files Modified
Core Authentication Logic
crates/router/src/core/unified_authentication_service.rs
- Main authentication service logiccrates/router/src/core/authentication/utils.rs
- Authentication utilitiescrates/router/src/services/authentication.rs
- Authentication servicesAPI Models & Routes
crates/api_models/src/authentication.rs
- Authentication API modelscrates/router/src/routes/authentication.rs
- Authentication route handlerscrates/router/src/routes/app.rs
- App routing configurationcrates/router/src/routes/lock_utils.rs
- Lock utilities for routesDomain Models
crates/hyperswitch_domain_models/src/authentication.rs
- Authentication domain modelscrates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs
- Request types for unified auth serviceConnector Integration
crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs
- Unified auth service connectorcrates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs
- Data transformerscrates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs
- Netcetera connector transformersConfiguration & Documentation
config/development.toml
- Development configuration updatesapi-reference/v1/openapi_spec_v1.json
- Updated OpenAPI v1 specificationapi-reference/v2/openapi_spec_v2.json
- Updated OpenAPI v2 specificationTechnical Implementation Details
Integration Points
How did you test it?
Try the flow with both Friction and Frictionless card
Setup Netcetera in MCA :
Setup Profile acquirer Config
Update Business Profile
Do Authentication Create :
Do Authentication Eligibility
RESPONSE
Authentication API
Response
Sync
Response
Checklist
cargo +nightly fmt --all
cargo clippy