1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = U2F , typescript_type = "U2F")]
    #[derive(Debug, Clone, PartialEq, Eq)]
    #[doc = "The `U2f` class."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/U2F)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `U2f`*"]
    pub type U2f;
    # [wasm_bindgen (catch , method , structural , js_class = "U2F" , js_name = register)]
    #[doc = "The `register()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/U2F/register)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `U2f`*"]
    pub fn register(
        this: &U2f,
        app_id: &str,
        register_requests: &::wasm_bindgen::JsValue,
        registered_keys: &::wasm_bindgen::JsValue,
        callback: &::js_sys::Function,
    ) -> Result<(), JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "U2F" , js_name = register)]
    #[doc = "The `register()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/U2F/register)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `U2f`*"]
    pub fn register_with_opt_timeout_seconds(
        this: &U2f,
        app_id: &str,
        register_requests: &::wasm_bindgen::JsValue,
        registered_keys: &::wasm_bindgen::JsValue,
        callback: &::js_sys::Function,
        opt_timeout_seconds: Option<i32>,
    ) -> Result<(), JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "U2F" , js_name = sign)]
    #[doc = "The `sign()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/U2F/sign)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `U2f`*"]
    pub fn sign(
        this: &U2f,
        app_id: &str,
        challenge: &str,
        registered_keys: &::wasm_bindgen::JsValue,
        callback: &::js_sys::Function,
    ) -> Result<(), JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "U2F" , js_name = sign)]
    #[doc = "The `sign()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/U2F/sign)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `U2f`*"]
    pub fn sign_with_opt_timeout_seconds(
        this: &U2f,
        app_id: &str,
        challenge: &str,
        registered_keys: &::wasm_bindgen::JsValue,
        callback: &::js_sys::Function,
        opt_timeout_seconds: Option<i32>,
    ) -> Result<(), JsValue>;
}
impl U2f {
    #[doc = "The `U2F.OK` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `U2f`*"]
    pub const OK: u16 = 0i64 as u16;
    #[doc = "The `U2F.OTHER_ERROR` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `U2f`*"]
    pub const OTHER_ERROR: u16 = 1u64 as u16;
    #[doc = "The `U2F.BAD_REQUEST` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `U2f`*"]
    pub const BAD_REQUEST: u16 = 2u64 as u16;
    #[doc = "The `U2F.CONFIGURATION_UNSUPPORTED` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `U2f`*"]
    pub const CONFIGURATION_UNSUPPORTED: u16 = 3u64 as u16;
    #[doc = "The `U2F.DEVICE_INELIGIBLE` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `U2f`*"]
    pub const DEVICE_INELIGIBLE: u16 = 4u64 as u16;
    #[doc = "The `U2F.TIMEOUT` const."]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `U2f`*"]
    pub const TIMEOUT: u16 = 5u64 as u16;
}