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"
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
{
22 CONFIGURATION_UNSUPPORTED
= 3,
23 DEVICE_INELIGIBLE
= 4,
27 typedef MozPromise
<nsString
, ErrorCode
, false> U2FPromise
;
29 NS_NAMED_LITERAL_STRING(kRequiredU2FVersion
, "U2F_V2");
32 } // namespace mozilla
34 #endif // mozilla_dom_U2FAuthenticator_h