web_sys/features/
gen_PublicKeyCredentialRequestOptionsJson.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 = PublicKeyCredentialRequestOptionsJSON)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `PublicKeyCredentialRequestOptionsJson` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type PublicKeyCredentialRequestOptionsJson;
17 #[cfg(web_sys_unstable_apis)]
18 #[doc = "Get the `allowCredentials` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
24 #[wasm_bindgen(method, getter = "allowCredentials")]
25 pub fn get_allow_credentials(
26 this: &PublicKeyCredentialRequestOptionsJson,
27 ) -> Option<::js_sys::Array>;
28 #[cfg(web_sys_unstable_apis)]
29 #[doc = "Change the `allowCredentials` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 #[wasm_bindgen(method, setter = "allowCredentials")]
36 pub fn set_allow_credentials(
37 this: &PublicKeyCredentialRequestOptionsJson,
38 val: &::wasm_bindgen::JsValue,
39 );
40 #[cfg(web_sys_unstable_apis)]
41 #[doc = "Get the `attestation` field of this object."]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
44 #[doc = ""]
45 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
46 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
47 #[wasm_bindgen(method, getter = "attestation")]
48 pub fn get_attestation(
49 this: &PublicKeyCredentialRequestOptionsJson,
50 ) -> Option<::alloc::string::String>;
51 #[cfg(web_sys_unstable_apis)]
52 #[doc = "Change the `attestation` field of this object."]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
55 #[doc = ""]
56 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
57 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
58 #[wasm_bindgen(method, setter = "attestation")]
59 pub fn set_attestation(this: &PublicKeyCredentialRequestOptionsJson, val: &str);
60 #[cfg(web_sys_unstable_apis)]
61 #[doc = "Get the `attestationFormats` field of this object."]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
64 #[doc = ""]
65 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
66 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
67 #[wasm_bindgen(method, getter = "attestationFormats")]
68 pub fn get_attestation_formats(
69 this: &PublicKeyCredentialRequestOptionsJson,
70 ) -> Option<::js_sys::Array>;
71 #[cfg(web_sys_unstable_apis)]
72 #[doc = "Change the `attestationFormats` field of this object."]
73 #[doc = ""]
74 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
75 #[doc = ""]
76 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
77 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
78 #[wasm_bindgen(method, setter = "attestationFormats")]
79 pub fn set_attestation_formats(
80 this: &PublicKeyCredentialRequestOptionsJson,
81 val: &::wasm_bindgen::JsValue,
82 );
83 #[cfg(web_sys_unstable_apis)]
84 #[doc = "Get the `challenge` field of this object."]
85 #[doc = ""]
86 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
87 #[doc = ""]
88 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
89 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
90 #[wasm_bindgen(method, getter = "challenge")]
91 pub fn get_challenge(this: &PublicKeyCredentialRequestOptionsJson) -> ::alloc::string::String;
92 #[cfg(web_sys_unstable_apis)]
93 #[doc = "Change the `challenge` field of this object."]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
96 #[doc = ""]
97 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
98 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
99 #[wasm_bindgen(method, setter = "challenge")]
100 pub fn set_challenge(this: &PublicKeyCredentialRequestOptionsJson, val: &str);
101 #[cfg(web_sys_unstable_apis)]
102 #[cfg(feature = "AuthenticationExtensionsClientInputsJson")]
103 #[doc = "Get the `extensions` field of this object."]
104 #[doc = ""]
105 #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputsJson`, `PublicKeyCredentialRequestOptionsJson`*"]
106 #[doc = ""]
107 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
108 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
109 #[wasm_bindgen(method, getter = "extensions")]
110 pub fn get_extensions(
111 this: &PublicKeyCredentialRequestOptionsJson,
112 ) -> Option<AuthenticationExtensionsClientInputsJson>;
113 #[cfg(web_sys_unstable_apis)]
114 #[cfg(feature = "AuthenticationExtensionsClientInputsJson")]
115 #[doc = "Change the `extensions` field of this object."]
116 #[doc = ""]
117 #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputsJson`, `PublicKeyCredentialRequestOptionsJson`*"]
118 #[doc = ""]
119 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
120 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
121 #[wasm_bindgen(method, setter = "extensions")]
122 pub fn set_extensions(
123 this: &PublicKeyCredentialRequestOptionsJson,
124 val: &AuthenticationExtensionsClientInputsJson,
125 );
126 #[cfg(web_sys_unstable_apis)]
127 #[doc = "Get the `hints` field of this object."]
128 #[doc = ""]
129 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
130 #[doc = ""]
131 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
132 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
133 #[wasm_bindgen(method, getter = "hints")]
134 pub fn get_hints(this: &PublicKeyCredentialRequestOptionsJson) -> Option<::js_sys::Array>;
135 #[cfg(web_sys_unstable_apis)]
136 #[doc = "Change the `hints` field of this object."]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
139 #[doc = ""]
140 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
141 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
142 #[wasm_bindgen(method, setter = "hints")]
143 pub fn set_hints(this: &PublicKeyCredentialRequestOptionsJson, val: &::wasm_bindgen::JsValue);
144 #[cfg(web_sys_unstable_apis)]
145 #[doc = "Get the `rpId` field of this object."]
146 #[doc = ""]
147 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
148 #[doc = ""]
149 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
150 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
151 #[wasm_bindgen(method, getter = "rpId")]
152 pub fn get_rp_id(
153 this: &PublicKeyCredentialRequestOptionsJson,
154 ) -> Option<::alloc::string::String>;
155 #[cfg(web_sys_unstable_apis)]
156 #[doc = "Change the `rpId` field of this object."]
157 #[doc = ""]
158 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
159 #[doc = ""]
160 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
161 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
162 #[wasm_bindgen(method, setter = "rpId")]
163 pub fn set_rp_id(this: &PublicKeyCredentialRequestOptionsJson, val: &str);
164 #[cfg(web_sys_unstable_apis)]
165 #[doc = "Get the `timeout` field of this object."]
166 #[doc = ""]
167 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
168 #[doc = ""]
169 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
170 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
171 #[wasm_bindgen(method, getter = "timeout")]
172 pub fn get_timeout(this: &PublicKeyCredentialRequestOptionsJson) -> Option<u32>;
173 #[cfg(web_sys_unstable_apis)]
174 #[doc = "Change the `timeout` field of this object."]
175 #[doc = ""]
176 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
177 #[doc = ""]
178 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
179 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
180 #[wasm_bindgen(method, setter = "timeout")]
181 pub fn set_timeout(this: &PublicKeyCredentialRequestOptionsJson, val: u32);
182 #[cfg(web_sys_unstable_apis)]
183 #[doc = "Get the `userVerification` field of this object."]
184 #[doc = ""]
185 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
186 #[doc = ""]
187 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
188 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
189 #[wasm_bindgen(method, getter = "userVerification")]
190 pub fn get_user_verification(
191 this: &PublicKeyCredentialRequestOptionsJson,
192 ) -> Option<::alloc::string::String>;
193 #[cfg(web_sys_unstable_apis)]
194 #[doc = "Change the `userVerification` field of this object."]
195 #[doc = ""]
196 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
197 #[doc = ""]
198 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
199 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
200 #[wasm_bindgen(method, setter = "userVerification")]
201 pub fn set_user_verification(this: &PublicKeyCredentialRequestOptionsJson, val: &str);
202}
203#[cfg(web_sys_unstable_apis)]
204impl PublicKeyCredentialRequestOptionsJson {
205 #[doc = "Construct a new `PublicKeyCredentialRequestOptionsJson`."]
206 #[doc = ""]
207 #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptionsJson`*"]
208 #[doc = ""]
209 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
210 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
211 pub fn new(challenge: &str) -> Self {
212 #[allow(unused_mut)]
213 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
214 ret.set_challenge(challenge);
215 ret
216 }
217 #[cfg(web_sys_unstable_apis)]
218 #[deprecated = "Use `set_allow_credentials()` instead."]
219 pub fn allow_credentials(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
220 self.set_allow_credentials(val);
221 self
222 }
223 #[cfg(web_sys_unstable_apis)]
224 #[deprecated = "Use `set_attestation()` instead."]
225 pub fn attestation(&mut self, val: &str) -> &mut Self {
226 self.set_attestation(val);
227 self
228 }
229 #[cfg(web_sys_unstable_apis)]
230 #[deprecated = "Use `set_attestation_formats()` instead."]
231 pub fn attestation_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
232 self.set_attestation_formats(val);
233 self
234 }
235 #[cfg(web_sys_unstable_apis)]
236 #[deprecated = "Use `set_challenge()` instead."]
237 pub fn challenge(&mut self, val: &str) -> &mut Self {
238 self.set_challenge(val);
239 self
240 }
241 #[cfg(web_sys_unstable_apis)]
242 #[cfg(feature = "AuthenticationExtensionsClientInputsJson")]
243 #[deprecated = "Use `set_extensions()` instead."]
244 pub fn extensions(&mut self, val: &AuthenticationExtensionsClientInputsJson) -> &mut Self {
245 self.set_extensions(val);
246 self
247 }
248 #[cfg(web_sys_unstable_apis)]
249 #[deprecated = "Use `set_hints()` instead."]
250 pub fn hints(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
251 self.set_hints(val);
252 self
253 }
254 #[cfg(web_sys_unstable_apis)]
255 #[deprecated = "Use `set_rp_id()` instead."]
256 pub fn rp_id(&mut self, val: &str) -> &mut Self {
257 self.set_rp_id(val);
258 self
259 }
260 #[cfg(web_sys_unstable_apis)]
261 #[deprecated = "Use `set_timeout()` instead."]
262 pub fn timeout(&mut self, val: u32) -> &mut Self {
263 self.set_timeout(val);
264 self
265 }
266 #[cfg(web_sys_unstable_apis)]
267 #[deprecated = "Use `set_user_verification()` instead."]
268 pub fn user_verification(&mut self, val: &str) -> &mut Self {
269 self.set_user_verification(val);
270 self
271 }
272}