V
V
vitya_brodov2022-03-28 13:56:06
Java
vitya_brodov, 2022-03-28 13:56:06

How to generate a signature in Spring boot Java?

To make a request-response in the direction of the Operator, it is necessary to make a signature described in the documentation, but I did not understand anything from the documentation.
6241944399b92144198182.png
I ask you experienced colleagues to explain / suggest how you can implement all these in Spring boot.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan, 2022-03-28
@vitya_brodov

Good afternoon.
It looks like it says what needs to be done. Even the js code is shown.
Do you want to integrate some third-party service, where will you send the request or what? If you want to generate some kind of signature, then most likely you need a controller with the url specified in the task (more information is needed).
And so, in short:
1) There is a URL where you need to send a request. To send a request from Spring use RestTemplate. If you need a reactive stack, then WebClient.
2) There is a JSON that needs to be sent to the Body. The json structure is specified in the second paragraph.
3) Next is salt (salt). To generate, use UUID.randomUUID().toString();
4) You also need to convert the secret key received from Namba One to hmac.
Here is an example:
https://www.baeldung.com/java-hmac

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question