Bug 1494333 - index crons just like artifacts r=Callek
[gecko.git] / dom / u2f / U2FAuthenticator.h
blobb0190d42d073d0748ae4cea9786124dc7d59bf03
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/. */
7 #ifndef mozilla_dom_U2FAuthenticator_h
8 #define mozilla_dom_U2FAuthenticator_h
10 #include "mozilla/MozPromise.h"
12 namespace mozilla {
13 namespace dom {
15 // These enumerations are defined in the FIDO U2F Javascript API under the
16 // interface "ErrorCode" as constant integers, and thus in the U2F.webidl file.
17 // Any changes to these must occur in both locations.
18 enum class ErrorCode {
19 OK = 0,
20 OTHER_ERROR = 1,
21 BAD_REQUEST = 2,
22 CONFIGURATION_UNSUPPORTED = 3,
23 DEVICE_INELIGIBLE = 4,
24 TIMEOUT = 5
27 typedef MozPromise<nsString, ErrorCode, false> U2FPromise;
29 NS_NAMED_LITERAL_STRING(kRequiredU2FVersion, "U2F_V2");
31 } // namespace dom
32 } // namespace mozilla
34 #endif // mozilla_dom_U2FAuthenticator_h