web_sys/features/
gen_AuthenticatorAssertionResponseJson.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = AuthenticatorAssertionResponseJSON)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `AuthenticatorAssertionResponseJson` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
13 #[doc = ""]
14 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type AuthenticatorAssertionResponseJson;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `attestationObject` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
21 #[doc = ""]
22 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "attestationObject")]
25 pub fn get_attestation_object(
26 this: &AuthenticatorAssertionResponseJson,
27 ) -> Option<::alloc::string::String>;
28 #[cfg(web_sys_unstable_apis)]
29 #[doc = "Change the `attestationObject` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
32 #[doc = ""]
33 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 #[wasm_bindgen(method, setter = "attestationObject")]
36 pub fn set_attestation_object(this: &AuthenticatorAssertionResponseJson, val: &str);
37 #[cfg(web_sys_unstable_apis)]
38 #[doc = "Get the `authenticatorData` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
41 #[doc = ""]
42 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
43 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
44 #[wasm_bindgen(method, getter = "authenticatorData")]
45 pub fn get_authenticator_data(
46 this: &AuthenticatorAssertionResponseJson,
47 ) -> ::alloc::string::String;
48 #[cfg(web_sys_unstable_apis)]
49 #[doc = "Change the `authenticatorData` field of this object."]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
52 #[doc = ""]
53 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
55 #[wasm_bindgen(method, setter = "authenticatorData")]
56 pub fn set_authenticator_data(this: &AuthenticatorAssertionResponseJson, val: &str);
57 #[cfg(web_sys_unstable_apis)]
58 #[doc = "Get the `clientDataJSON` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
61 #[doc = ""]
62 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
63 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
64 #[wasm_bindgen(method, getter = "clientDataJSON")]
65 pub fn get_client_data_json(
66 this: &AuthenticatorAssertionResponseJson,
67 ) -> ::alloc::string::String;
68 #[cfg(web_sys_unstable_apis)]
69 #[doc = "Change the `clientDataJSON` field of this object."]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
72 #[doc = ""]
73 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
75 #[wasm_bindgen(method, setter = "clientDataJSON")]
76 pub fn set_client_data_json(this: &AuthenticatorAssertionResponseJson, val: &str);
77 #[cfg(web_sys_unstable_apis)]
78 #[doc = "Get the `signature` field of this object."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
81 #[doc = ""]
82 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
83 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
84 #[wasm_bindgen(method, getter = "signature")]
85 pub fn get_signature(this: &AuthenticatorAssertionResponseJson) -> ::alloc::string::String;
86 #[cfg(web_sys_unstable_apis)]
87 #[doc = "Change the `signature` field of this object."]
88 #[doc = ""]
89 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
90 #[doc = ""]
91 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
92 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
93 #[wasm_bindgen(method, setter = "signature")]
94 pub fn set_signature(this: &AuthenticatorAssertionResponseJson, val: &str);
95 #[cfg(web_sys_unstable_apis)]
96 #[doc = "Get the `userHandle` field of this object."]
97 #[doc = ""]
98 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
99 #[doc = ""]
100 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
101 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
102 #[wasm_bindgen(method, getter = "userHandle")]
103 pub fn get_user_handle(
104 this: &AuthenticatorAssertionResponseJson,
105 ) -> Option<::alloc::string::String>;
106 #[cfg(web_sys_unstable_apis)]
107 #[doc = "Change the `userHandle` field of this object."]
108 #[doc = ""]
109 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
110 #[doc = ""]
111 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
112 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
113 #[wasm_bindgen(method, setter = "userHandle")]
114 pub fn set_user_handle(this: &AuthenticatorAssertionResponseJson, val: &str);
115}
116#[cfg(web_sys_unstable_apis)]
117impl AuthenticatorAssertionResponseJson {
118 #[doc = "Construct a new `AuthenticatorAssertionResponseJson`."]
119 #[doc = ""]
120 #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAssertionResponseJson`*"]
121 #[doc = ""]
122 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
123 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
124 pub fn new(authenticator_data: &str, client_data_json: &str, signature: &str) -> Self {
125 #[allow(unused_mut)]
126 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
127 ret.set_authenticator_data(authenticator_data);
128 ret.set_client_data_json(client_data_json);
129 ret.set_signature(signature);
130 ret
131 }
132 #[cfg(web_sys_unstable_apis)]
133 #[deprecated = "Use `set_attestation_object()` instead."]
134 pub fn attestation_object(&mut self, val: &str) -> &mut Self {
135 self.set_attestation_object(val);
136 self
137 }
138 #[cfg(web_sys_unstable_apis)]
139 #[deprecated = "Use `set_authenticator_data()` instead."]
140 pub fn authenticator_data(&mut self, val: &str) -> &mut Self {
141 self.set_authenticator_data(val);
142 self
143 }
144 #[cfg(web_sys_unstable_apis)]
145 #[deprecated = "Use `set_client_data_json()` instead."]
146 pub fn client_data_json(&mut self, val: &str) -> &mut Self {
147 self.set_client_data_json(val);
148 self
149 }
150 #[cfg(web_sys_unstable_apis)]
151 #[deprecated = "Use `set_signature()` instead."]
152 pub fn signature(&mut self, val: &str) -> &mut Self {
153 self.set_signature(val);
154 self
155 }
156 #[cfg(web_sys_unstable_apis)]
157 #[deprecated = "Use `set_user_handle()` instead."]
158 pub fn user_handle(&mut self, val: &str) -> &mut Self {
159 self.set_user_handle(val);
160 self
161 }
162}