Skip to content

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

Merged
merged 84 commits into from
Jul 31, 2025

Conversation

sahkal
Copy link
Contributor

@sahkal sahkal commented Jul 10, 2025

Type of Change

  • New feature

Description

The main feature is the addition of a new authentication synchronization API that allows syncing authentication data between systems.

API Contract Changes

  • Updated OpenAPI specifications (v1 and v2)
  • Added new authentication endpoints and data models
  • Modified existing API contracts to support the new sync functionality

Files Modified

Core Authentication Logic

  • crates/router/src/core/unified_authentication_service.rs - Main authentication service logic
  • crates/router/src/core/authentication/utils.rs - Authentication utilities
  • crates/router/src/services/authentication.rs - Authentication services

API Models & Routes

  • crates/api_models/src/authentication.rs - Authentication API models
  • crates/router/src/routes/authentication.rs - Authentication route handlers
  • crates/router/src/routes/app.rs - App routing configuration
  • crates/router/src/routes/lock_utils.rs - Lock utilities for routes

Domain Models

  • crates/hyperswitch_domain_models/src/authentication.rs - Authentication domain models
  • crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs - Request types for unified auth service

Connector Integration

  • crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs - Unified auth service connector
  • crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs - Data transformers
  • crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs - Netcetera connector transformers

Configuration & Documentation

  • config/development.toml - Development configuration updates
  • api-reference/v1/openapi_spec_v1.json - Updated OpenAPI v1 specification
  • api-reference/v2/openapi_spec_v2.json - Updated OpenAPI v2 specification

Technical Implementation Details

Integration Points

  • Unified Authentication Service integration
  • Netcetera connector enhancements
  • Business profile integration with merchant country code
  • SDK information handling improvements

How did you test it?

Try the flow with both Friction and Frictionless card

Setup Netcetera in MCA :

curl --location 'http://localhost:8080/account/sahkal11/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \
--data '
{
    "connector_type": "authentication_processor",
    "connector_name": "netcetera",
    "connector_account_details": {
            "auth_type": "CertificateAuth",
            "certificate": CERTIFICATE,
            "private_key": PRIVATE_KEY
        },
    "test_mode": true,
    "disabled": false,
    "metadata": {
        "merchant_category_code": "5411",
        "merchant_country_code": "840",
        "merchant_name": "Dummy Merchant",
        "endpoint_prefix": "flowbird",
        "three_ds_requestor_name": "juspay-prev",
        "three_ds_requestor_id": "juspay-prev",
        "pull_mechanism_for_external_3ds_enabled": false
    }
}
'

Setup Profile acquirer Config

curl --location 'localhost:8080/profile_acquirer' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \
--data '{
  "acquirer_assigned_merchant_id": "00002000000",
  "merchant_name": "Demo Merchant",
  "network": "AmericanExpress",
  "acquirer_bin": "400000",
  "acquirer_fraud_rate": 0.2345545234765,
  "profile_id": "pro_89fr3mDlSeDfh8fro28W"
}'

Update Business Profile

curl --location 'http://localhost:8080/account/sahkal11/business_profile/pro_89fr3mDlSeDfh8fro28W' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \
--data '
{
    "authentication_connector_details": {
        "authentication_connectors": ["netcetera"],
        "three_ds_requestor_url": "https://google.com"
    },
    "merchant_country_code": "004",
    "merchant_category_code": "5411"
}
'

Do Authentication Create :

curl --location 'localhost:8080/authentication' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \
--data '{
    "amount": 10,
    "currency": "USD",
    "acquirer_details": {
        "merchant_id": "12134",
        "bin": "438309",
        "country_code": null
    },
    "authentication_connector":"netcetera",
    "profile_acquirer_id": "pro_acq_JO8uZghB4Y6qJFAgkUbI"
}'

Do Authentication Eligibility

curl --location 'localhost:8080/authentication/authn_G2nUqHYBrMLIMgcyO8Az/eligibility' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_xekWBE7fjlTQ4d4fsmYBqgoNyBdfLaZxggJ6nY4tL2Eyl0Ece6lGGH1o7N4ZtrE3' \
--data-raw '{
     "payment_method": "card",
    "payment_method_data": {
        "card": {  
            "card_number": CARD_NUMBER, 
            "card_exp_month": "10",
            "card_exp_year": "25",
            "card_holder_name": "joseph Doe",
            "card_cvc": "123"
        }
    },
    "billing": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "CA",
            "zip": "94122",
            "country": "US",
            "first_name": "PiX"
        },
        "phone": {
            "number": "123456789",
            "country_code": "12"
        }
    },
    "shipping": {
        "address": {
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "city": "San Fransico",
            "state": "California",
            "zip": "94122",
            "country": "US",
            "first_name": "PiX"
        },
        "phone": {
            "number": "123456789",
            "country_code": "12"
        }
    },
    "email": "[email protected]",
    "browser_information": {
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "language": "nl-NL",
        "color_depth": 24,
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "java_enabled": true,
        "java_script_enabled": true,
        "ip_address": "115.99.183.2"
    },
    "profile_acquirer_id": "pro_acq_LhAY1jDOAYJuHeUAQWwh"
}'

RESPONSE

{
    "authentication_id": "authn_U4Z7xqe7HHIScfDU50xW",
    "next_api_action": {
        "url": "http://localhost:8080/authentication/authn_U4Z7xqe7HHIScfDU50xW/authenticate",
        "http_method": "POST"
    },
    "status": "pending",
    "eligibility_response_params": {
        "ThreeDsData": {
            "threeds_server_transaction_id": "ed790486-dda7-4972-83ab-5d0afbaa8885",
            "maximum_supported_3ds_version": "2.3.1",
            "connector_authentication_id": "ed790486-dda7-4972-83ab-5d0afbaa8885",
            "three_ds_method_data": "eyJ0aHJlZURTTWV0aG9kTm90aWZpY2F0aW9uVVJMIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS8zZHMtbWV0aG9kLW5vdGlmaWNhdGlvbi11cmwiLCJ0aHJlZURTU2VydmVyVHJhbnNJRCI6ImVkNzkwNDg2LWRkYTctNDk3Mi04M2FiLTVkMGFmYmFhODg4NSJ9",
            "three_ds_method_url": "https://ndm-prev.3dss-non-prod.cloud.netcetera.com/acs/3ds-method",
            "message_version": "2.3.1",
            "directory_server_id": "A000000003"
        }
    },
    "connector_metadata": null,
    "profile_id": "pro_To47L194jVTevrWXRxR3",
    "error_message": null,
    "error_code": null,
    "authentication_connector": "netcetera",
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "CA",
            "first_name": "PiX",
            "last_name": null
        },
        "phone": {
            "number": "123456789",
            "country_code": "12"
        },
        "email": null
    },
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "PiX",
            "last_name": null
        },
        "phone": {
            "number": "123456789",
            "country_code": "12"
        },
        "email": null
    },
    "browser_information": {
        "color_depth": 24,
        "java_enabled": true,
        "java_script_enabled": true,
        "language": "nl-NL",
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "ip_address": "115.99.183.2",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "os_type": null,
        "os_version": null,
        "device_model": null
    },
    "email": "[email protected]"
}

Authentication API

curl --location 'localhost:8080/authentication/authn_mZZSwXGzD20i4x41pjLp/authenticate' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_MB8FHXAmDStuArWrRisGDRe6kadzIIxWgOI8Bk0uEHtIkU5WA2oxcBrvozEjjiP2' \
--data '
{
    
    "device_channel": "APP",
    "threeds_method_comp_ind": "N",
    "sdk_information": {
        "sdk_app_id": "4d017186-318a-42e0-99cd-203367af5aa1",
        "sdk_enc_data": "eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0.AeiTEwYFYMBl68uRqI2ePfIYJ_xDjZDBjvD-2dS4vCKUCUz-Pab8OVf5DiA8LovnoMI8dVJbFCVfWEgSjb8S99rFkm_g-J3hnBdiWgr7inSoW9NCvHgKU9hrTkhWijOFXNWHtBO4ECYIQg93RCv3svVDGTBkx0CucxlzkZF0Ct4sknMH6p4BGdioet8P8PVZPQcpM_9bd8JSdK1V8sUPPneeyYqlJ3MEQdZSfggRixUvlxdVhxVLlFHLyhjqzN7MpFT3NWsIG7mikkkLjlDlAE29Qm8xLBxqgL8apq57IR8map7KqacT20Uxirstskrlh6nfAk8aqU_Eo78Gd6XZrQ.12WaY03igq7b8At8GXXM7g.qpqNbumX0rpW1WRB_tMOsfVOeYzz6LbJfLFgSH49yMVvfGha7hEYEy0_h5nbPkWA_S95SubmfxQeN9Ale6uPTT_-lfSb4DpHKTMaYx3pVZrYA2qtR-0Iuft-t-zerEfqrd87TaKZNPxGzvrt6tdSig4PmFpg07AqcwQGDVvkxja_wO7PgcvR6lmKAt73IMJYAVXxb6oW1nGREJtzK9rTob48qnMdAJmmB3-0DwCeb7zZaNLI8ngs7qMj740atmzfR-cLdQ3AHDMlv0n4C7INFaaIn3vsJ_UxFuGCTmrT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LuPm_mtzSYMj6HxwHjvMB1Yqd9iVUkXQgdRU_kRROK3anyKeetezft1-G4E_ScUNONODn",
        "sdk_ephem_pub_key": {
            "kty": "EC",
            "x": "AIKHXxBSZ9t7wzeiZ9ZpsCjL84btRwXfMM3mtqaQjJw",
            "y": "6lY5bSlSsx40gUPGKRXBcL05v_rQncf6k0qmLc4V8Qs",
            "crv": "P-256"
        },
        "sdk_trans_id": "705d277d-e11e-4518-9cf2-88e35fccf8b3",
        "sdk_reference_number": "3DS_LOA_SDK_NEAG_020301_00792",
        "sdk_max_timeout": 15
    }
}
'

Response

{
    "trans_status": "C",
    "acs_url": null,
    "challenge_request": null,
    "acs_reference_number": "3DS_LOA_ACS_201_13579",
    "acs_trans_id": "3ed60678-2116-4b3d-ba8b-fea3368694ee",
    "three_dsserver_trans_id": "e2f6ac79-b9ef-49a1-999a-2f3d998300db",
    "acs_signed_content": null,
    "three_ds_requestor_url": "https://google.com",
    "three_ds_requestor_app_url": null,
    "error_message": null,
    "error_code": null,
    "authentication_value": null,
    "status": "pending",
    "authentication_connector": "netcetera"
}

Sync

curl --location --request POST 'localhost:8080/authentication/authn_xfnVvnZIWfGMaHrwEBGJ/sync' \
--header 'api-key: dev_5oijCvZhFkoyZWkDFaLPGeN9kajUAt03yG6Aju1DSh79ghiT8i8moIEsjRxVf6Tq' \
--data ''

Response

{
    "authentication_id": "authn_xfnVvnZIWfGMaHrwEBGJ",
    "merchant_id": "sahkal11",
    "status": "success",
    "client_secret": "authn_xfnVvnZIWfGMaHrwEBGJ_secret_b1iIylqBuPVUBw1EYibA",
    "amount": 10,
    "currency": "USD",
    "authentication_connector": "netcetera",
    "force_3ds_challenge": false,
    "return_url": null,
    "created_at": "2025-07-26T11:30:13.974Z",
    "profile_id": "pro_BEX6ZBeTBuJq3TxXrjwz",
    "psd2_sca_exemption_type": null,
    "acquirer_details": {
        "bin": "400000",
        "merchant_id": "00002000000",
        "country_code": "004"
    },
    "threeds_server_transaction_id": "23be8c88-8dee-4279-94c0-7c7a7148ad74",
    "maximum_supported_3ds_version": "2.3.1",
    "connector_authentication_id": "23be8c88-8dee-4279-94c0-7c7a7148ad74",
    "three_ds_method_data": "eyJ0aHJlZURTTWV0aG9kTm90aWZpY2F0aW9uVVJMIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS8zZHMtbWV0aG9kLW5vdGlmaWNhdGlvbi11cmwiLCJ0aHJlZURTU2VydmVyVHJhbnNJRCI6IjIzYmU4Yzg4LThkZWUtNDI3OS05NGMwLTdjN2E3MTQ4YWQ3NCJ9",
    "three_ds_method_url": "https://ndm-prev.3dss-non-prod.cloud.netcetera.com/acs/3ds-method",
    "message_version": "2.3.1",
    "connector_metadata": null,
    "directory_server_id": "A000000003",
    "billing": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "CA",
            "first_name": "PiX",
            "last_name": null
        },
        "phone": {
            "number": "123456789",
            "country_code": "12"
        },
        "email": null
    },
    "shipping": {
        "address": {
            "city": "San Fransico",
            "country": "US",
            "line1": "1467",
            "line2": "Harrison Street",
            "line3": "Harrison Street",
            "zip": "94122",
            "state": "California",
            "first_name": "PiX",
            "last_name": null
        },
        "phone": {
            "number": "123456789",
            "country_code": "12"
        },
        "email": null
    },
    "browser_information": {
        "color_depth": 24,
        "java_enabled": true,
        "java_script_enabled": true,
        "language": "nl-NL",
        "screen_height": 723,
        "screen_width": 1536,
        "time_zone": 0,
        "ip_address": "115.99.183.2",
        "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
        "os_type": null,
        "os_version": null,
        "device_model": null
    },
    "email": "[email protected]",
    "trans_status": "Y",
    "acs_url": null,
    "challenge_request": null,
    "acs_reference_number": null,
    "acs_trans_id": null,
    "three_dsserver_trans_id": "23be8c88-8dee-4279-94c0-7c7a7148ad74",
    "acs_signed_content": null,
    "three_ds_requestor_url": "https://google.com",
    "three_ds_requestor_app_url": null,
    "authentication_value": "MTIzNDU2Nzg5MDA5ODc2NTQzMjE=",
    "error_message": null,
    "error_code": null,
    "profile_acquirer_id": "pro_acq_ebY2fZAOqqjMAikwIMqH"
}

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

sahkal and others added 30 commits May 20, 2025 17:28
…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
Copy link
Contributor

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>,
Copy link
Contributor

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?

Copy link
Contributor Author

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>,
Copy link
Contributor

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!(
Copy link
Contributor

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?

Copy link
Contributor Author

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(),
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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

ThisIsMani
ThisIsMani previously approved these changes Jul 29, 2025
Copy link
Contributor

@ThisIsMani ThisIsMani left a 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.

@sahkal sahkal requested a review from ShankarSinghC July 30, 2025 10:48
@likhinbopanna likhinbopanna added this pull request to the merge queue Jul 31, 2025
Merged via the queue into main with commit 794dce1 Jul 31, 2025
16 of 20 checks passed
@likhinbopanna likhinbopanna deleted the 9947-add-authentication-sync-api branch July 31, 2025 07:34
pixincreate added a commit that referenced this pull request Jul 31, 2025
…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)
pixincreate added a commit that referenced this pull request Aug 1, 2025
…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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: Feature request or enhancement M-api-contract-changes Metadata: This PR involves API contract changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants