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

cool#9992 doc electronic sign: actually sign the hash in a popup #10603

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

vmiklos
Copy link
Contributor

@vmiklos vmiklos commented Nov 26, 2024

Open an PDF in Draw, Insert -> Electronic signature, the doc hash is
sent to ESignatureBaseUrl, but we don't attempt to sign it.

The actual signing happens using a HTML page provided by eIDEasy, so
open that in a popup.

We can avoid polling for the signature result by listening for
postmessages: the signing popups sends us a postmessage on completion.

This is the same mechanism that's used by the SignatureJS npm library,
developed by eIDEasy (but don't use that here, since it would pull in a
number of dependencies since it doesn't use the fetch() API).

Signed-off-by: Miklos Vajna vmiklos@collabora.com
Change-Id: I10902ec6868a64f250fe5afdd0cf9ba36a2f63e6

Open an PDF in Draw, Insert -> Electronic signature, the doc hash is
sent to ESignatureBaseUrl, but we don't attempt to sign it.

The actual signing happens using a HTML page provided by eIDEasy, so
open that in a popup.

We can avoid polling for the signature result by listening for
postmessages: the signing popups sends us a postmessage on completion.

This is the same mechanism that's used by the SignatureJS npm library,
developed by eIDEasy (but don't use that here, since it would pull in a
number of dependencies since it doesn't use the fetch() API).

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I10902ec6868a64f250fe5afdd0cf9ba36a2f63e6
@vmiklos
Copy link
Contributor Author

vmiklos commented Nov 26, 2024

@caolanm could you please review this? Thanks.

If you want to try it, see #9992 (comment) for a test config. Initially I thought I need to poll the server if we have a result or need to wait more, but turns out there is a postmessage we can listen to, which I consider nice.

@vmiklos vmiklos requested a review from caolanm November 26, 2024 09:18
@vmiklos vmiklos merged commit a1d81fd into master Nov 26, 2024
13 checks passed
@vmiklos vmiklos deleted the private/vmiklos/master branch November 26, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants