gecko-dev/dom/webauthn/PWebAuthnTransaction.ipdl
Tim Taubert f7e1c16e21 Bug 1409116 - Rename {WebAuthn,U2F}TransactionParent::Cancel message to Abort r=jcj
Summary:
We currently allow sending a "Cancel" message from the child to abort a running
transaction, e.g. when the user switches away from the currently active tab.

We have a message with the same name "Cancel" sent by the parent when the
transaction is aborted due to failure somewhere in the token manager.

This patch renames abort messages from the parent to "Abort" to clarify the
purpose of the message.

Reviewers: jcj

Reviewed By: jcj

Bug #: 1409116

Differential Revision: https://phabricator.services.mozilla.com/D127

--HG--
extra : amend_source : ee6767965ad928033eb23b258aacf54bbaf57d2d
2017-10-17 11:30:55 +02:00

53 lines
1.6 KiB
Plaintext

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/*
* IPC Transaction protocol for the WebAuthn DOM API. This IPC protocol allows
* the content process to call to the parent to access hardware for
* authentication registration and challenges. All transactions start in the
* child process, and the parent replies with a "Confirm*" message, or a
* "Cancel" message if there was an error (no hardware available, no registered
* keys, etc) or interruption (another transaction was started in another
* content process). Similarly, the content process can also request a cancel,
* either triggered explicitly by the user/script or due to UI events like
* selecting a different tab.
*/
include protocol PBackground;
namespace mozilla {
namespace dom {
struct WebAuthnScopedCredentialDescriptor {
uint8_t[] id;
};
struct WebAuthnExtension {
/* TODO Fill in with predefined extensions */
};
struct WebAuthnTransactionInfo {
uint8_t[] RpIdHash;
uint8_t[] ClientDataHash;
uint32_t TimeoutMS;
WebAuthnScopedCredentialDescriptor[] Descriptors;
WebAuthnExtension[] Extensions;
};
async protocol PWebAuthnTransaction {
manager PBackground;
parent:
async __delete__();
async RequestRegister(WebAuthnTransactionInfo aTransactionInfo);
async RequestSign(WebAuthnTransactionInfo aTransactionInfo);
async RequestCancel();
child:
async ConfirmRegister(uint8_t[] RegBuffer);
async ConfirmSign(uint8_t[] CredentialID, uint8_t[] ReplyBuffer);
async Abort(nsresult Error);
};
}
}