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

Add examples for signature #125

Open
3 tasks
Rossb0b opened this issue Oct 31, 2023 · 0 comments
Open
3 tasks

Add examples for signature #125

Rossb0b opened this issue Oct 31, 2023 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@Rossb0b
Copy link
Member

Rossb0b commented Oct 31, 2023

Actually, there is only one example of how to deal with our generated signature and this one is in JS.

  const { headers, body } = req;

  const { signature, date } = headers;

  const generatedSignature = createHmac("sha256", kSecret)
    .update(JSON.stringify(body) + date)
    .digest("hex");

  if (signature !== generatedSignature) {
    throw new Error("Wrong signature");
  }

It would be great to have this particular code in those languages :

  • C++
  • Java
  • Python
@Rossb0b Rossb0b added documentation Improvements or additions to documentation good first issue Good for newcomers labels Oct 31, 2023
@Rossb0b Rossb0b self-assigned this Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant