Source code

Revision control

Other Tools

1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
* License, v. 2.0. If a copy of the MPL was not distributed with this
5
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#ifndef mozilla_dom_WebAuthnTransactionParent_h
8
#define mozilla_dom_WebAuthnTransactionParent_h
9
10
#include "mozilla/dom/PWebAuthnTransactionParent.h"
11
12
/*
13
* Parent process IPC implementation for WebAuthn and U2F API. Receives
14
* authentication data to be either registered or signed by a key, passes
15
* information to U2FTokenManager.
16
*/
17
18
namespace mozilla {
19
namespace dom {
20
21
class WebAuthnTransactionParent final : public PWebAuthnTransactionParent {
22
public:
23
NS_INLINE_DECL_REFCOUNTING(WebAuthnTransactionParent);
24
WebAuthnTransactionParent() = default;
25
26
mozilla::ipc::IPCResult RecvRequestRegister(
27
const uint64_t& aTransactionId,
28
const WebAuthnMakeCredentialInfo& aTransactionInfo);
29
30
mozilla::ipc::IPCResult RecvRequestSign(
31
const uint64_t& aTransactionId,
32
const WebAuthnGetAssertionInfo& aTransactionInfo);
33
34
mozilla::ipc::IPCResult RecvRequestCancel(const uint64_t& aTransactionId);
35
36
mozilla::ipc::IPCResult RecvDestroyMe();
37
38
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
39
40
private:
41
~WebAuthnTransactionParent() = default;
42
};
43
44
} // namespace dom
45
} // namespace mozilla
46
47
#endif // mozilla_dom_WebAuthnTransactionParent_h