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