Skip to content

Add signature handling for dLocal API requests#175

Merged
armando-rodriguez-cko merged 1 commit into
masterfrom
feature/add-signature-handling-for-dLocal-API-requests
Jun 23, 2025
Merged

Add signature handling for dLocal API requests#175
armando-rodriguez-cko merged 1 commit into
masterfrom
feature/add-signature-handling-for-dLocal-API-requests

Conversation

@armando-rodriguez-cko
Copy link
Copy Markdown
Contributor

This pull request introduces support for adding signatures to forwarded HTTP requests, specifically integrating dLocal's signature mechanism. It includes updates to the forward package to define new types and methods for signatures and modifies the DestinationRequest struct to support optional signature configurations. Additionally, corresponding test cases are added to validate the new functionality.

Enhancements to Signature Support:

  • New SignatureType and AbstractSignature interface: Added SignatureType and AbstractSignature to represent and manage different signature mechanisms. Defined dlocalSignature as an implementation of AbstractSignature. (forward/forward.go, [1] [2]
  • DestinationRequest struct updates: Introduced a new Signature field in DestinationRequest to optionally include signature configurations in forwarded requests. (forward/forward.go, forward/forward.goL75-R114)
  • Factory method for dLocal signature: Added NewDlocalSignature function to create instances of dlocalSignature with predefined type. (forward/forward.go, forward/forward.goR194-R208)

Testing Additions:

  • Test case updates: Modified getForwardRequestIdSource test to include a DlocalSignature instance, ensuring the signature functionality is properly validated. (test/forward_test.go, [1] [2]

@armando-rodriguez-cko armando-rodriguez-cko requested a review from a team June 23, 2025 11:15
@armando-rodriguez-cko armando-rodriguez-cko merged commit d82bade into master Jun 23, 2025
4 checks passed
@armando-rodriguez-cko armando-rodriguez-cko deleted the feature/add-signature-handling-for-dLocal-API-requests branch June 23, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants