Skip to content
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

[PAYG-723] Adds rust tl-signature example #54

Conversation

tl-flavio-barinas
Copy link
Contributor

@tl-flavio-barinas tl-flavio-barinas commented Mar 24, 2022

#51 for Rust

Rust request signature example

Sends a signed request to https://api.truelayer-sandbox.com/test-signature.

Run

Set environment variables:

  • ACCESS_TOKEN A valid JWT access token for payments scope docs.
  • KID The certificate/key UUID for associated with your public key uploaded to console.truelayer.com.
  • PRIVATE_KEY Private key PEM string that matches the KID & uploaded public key.
    Should have the same format as this example private key.
$ cargo run
204 No Content ✓

@tl-flavio-barinas tl-flavio-barinas requested a review from a team as a code owner March 24, 2022 15:45
@tl-flavio-barinas tl-flavio-barinas requested a review from a team March 24, 2022 15:45
@alexheretic
Copy link
Contributor

Lets add a link in the README too, like https://github.com/TrueLayer/truelayer-signing/blob/main/nodejs/README.md?plain=1#L25

@alexheretic
Copy link
Contributor

Great! It would be good to have similar comments to what we have in the nodejs & C# ones too.

E.g. explaining each bit of the signing call and reiterating

// Request body & any signed headers *must* exactly match what was used to generate the signature.

Probably just worth copying those comments into the rust example in the right places.

Copy link
Contributor

@alexheretic alexheretic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great stuff 🎉

@alexheretic
Copy link
Contributor

I'm not sure why only the java actions are running though, this happened on the recent C# pr too..but not the nodejs one 🤔

@tl-flavio-barinas tl-flavio-barinas merged commit 4e6bb2f into main Mar 25, 2022
@tl-flavio-barinas tl-flavio-barinas deleted the PAYG-723-truelayer-signing-add-rust-sign-request-example branch March 25, 2022 10:55
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