Skip to content

Conversation

@tab
Copy link
Owner

@tab tab commented Feb 28, 2025

The WithNonce method allows setting a nonce value in the client configuration

TODO:

  • add nonce option
  • generate the same hash for the same payload

The API documentation specifies that for idempotent behavior, requests must be "exactly the same." Since hash is generated randomly for each request, the requests are not identical, and therefore might not trigger the idempotency mechanism.

---- body ----
{DEMO 00000000-0000-0000-0000-000000000000 PNOEE-40504040001 QUALIFIED aQRGdnOpkKCfeZ0UzO5hrIT8k+/95lnd4f63T6Owa/QY6IaKdlT4Hwh5VHcxXNjCYEweycSoJtPl1QY2zL0ybQ== SHA512 40504040001 [{displayTextAndPIN Enter PIN1 }]}
---- response ----
{"sessionID":"276fb6c3-9010-49e7-9d9a-efc99e92149f"}
Session created: &{276fb6c3-9010-49e7-9d9a-efc99e92149f 0969}

---- body ----
{DEMO 00000000-0000-0000-0000-000000000000 PNOEE-40504040001 QUALIFIED 0n0elO2Lw2MhN21UDdNlM58pdHQSV20G0u+p/NljcX1+ujSqnrsm6ixEFwkH48SYFblheNf9eQx0jc3Sylydgw== SHA512 40504040001 [{displayTextAndPIN Enter PIN1 }]}
---- response ----
{"sessionID":"dc60f203-fca4-4f0f-9a50-11f65232b045"}
Session created: &{dc60f203-fca4-4f0f-9a50-11f65232b045 2095}

Fetched person: &{PNOEE-40504040001 40504040001 TESTNUMBER OK}
Fetched person: &{PNOEE-40504040001 40504040001 TESTNUMBER OK}

The WithNonce method allows setting a nonce value in the client configuration
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.55%. Comparing base (4116664) to head (39a1d59).

❌ Your project status has failed because the head coverage (76.55%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #29      +/-   ##
==========================================
+ Coverage   76.35%   76.55%   +0.19%     
==========================================
  Files          11       11              
  Lines         478      482       +4     
==========================================
+ Hits          365      369       +4     
  Misses        104      104              
  Partials        9        9              
Files with missing lines Coverage Δ
client.go 100.00% <100.00%> (ø)
internal/requests/requests.go 82.85% <100.00%> (+0.16%) ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants