-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cool#10630 doc electronic sign: send the hash on the server
I missed this so far, but <https://docs.eideasy.com/guide/api-credentials.html> suggests that the the API calls the require a secret (and not just the client ID) has to be performed on the server, so the secret can be kept there. Add a new .uno:PrepareSignature UNO command that performs the API call on the server and generates a command result; so the new setup is quite similar to the old fetch() API which did a HTTP request in the browser and also had a callback. This requires adapting the cypress test that used to intercept network calls via cy.intercept(). Now we want to intercept traffic on the websocket instead. This seems to be possible by using <https://docs.cypress.io/api/commands/fixture> to load test data, then <https://docs.cypress.io/api/commands/stub> to intercept sending a specific UNO command, finally using the underlying <https://sinonjs.org/releases/latest/stubs/#stubcallthrough> to leave the rest of the UNO commands unchanged. The other problematic "download signature" step is not yet changed here. Signed-off-by: Miklos Vajna <[email protected]> Change-Id: I84e7eee60fe9dc6e620cd71f8b85a086a0d08c4c
- Loading branch information
Showing
5 changed files
with
130 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters