Skip to content

Commit

Permalink
Update Webauthn IDL to level 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Firstyear committed Apr 24, 2024
1 parent 393d629 commit dfe8272
Show file tree
Hide file tree
Showing 44 changed files with 2,063 additions and 154 deletions.
24 changes: 24 additions & 0 deletions crates/web-sys/Cargo.toml
Expand Up @@ -103,10 +103,22 @@ AudioWorkletNode = ["AudioNode", "EventTarget"]
AudioWorkletNodeOptions = []
AudioWorkletProcessor = []
AuthenticationExtensionsClientInputs = []
AuthenticationExtensionsClientInputsJson = []
AuthenticationExtensionsClientOutputs = []
AuthenticationExtensionsClientOutputsJson = []
AuthenticationExtensionsLargeBlobInputs = []
AuthenticationExtensionsLargeBlobOutputs = []
AuthenticationExtensionsPrfInputs = []
AuthenticationExtensionsPrfOutputs = []
AuthenticationExtensionsPrfValues = []
AuthenticationExtensionsSupplementalPubKeysInputs = []
AuthenticationExtensionsSupplementalPubKeysOutputs = []
AuthenticationResponseJson = []
AuthenticatorAssertionResponse = ["AuthenticatorResponse"]
AuthenticatorAssertionResponseJson = []
AuthenticatorAttachment = []
AuthenticatorAttestationResponse = ["AuthenticatorResponse"]
AuthenticatorAttestationResponseJson = []
AuthenticatorResponse = []
AuthenticatorSelectionCriteria = []
AuthenticatorTransport = []
Expand Down Expand Up @@ -184,6 +196,7 @@ CheckerboardReportService = []
ChromeFilePropertyBag = []
ChromeWorker = ["EventTarget", "Worker"]
Client = []
ClientCapability = []
ClientQueryOptions = []
ClientRectsAndTexts = []
ClientType = []
Expand Down Expand Up @@ -234,6 +247,7 @@ Coordinates = []
CountQueuingStrategy = []
Credential = []
CredentialCreationOptions = []
CredentialPropertiesOutput = []
CredentialRequestOptions = []
CredentialsContainer = []
Crypto = []
Expand Down Expand Up @@ -750,6 +764,7 @@ KeyframeEffect = ["AnimationEffect"]
KeyframeEffectOptions = []
L10nElement = []
L10nValue = []
LargeBlobSupport = []
LatencyMode = []
LifecycleCallbacks = []
LineAlignSetting = []
Expand Down Expand Up @@ -998,13 +1013,18 @@ PromiseRejectionEvent = ["Event"]
PromiseRejectionEventInit = []
PublicKeyCredential = ["Credential"]
PublicKeyCredentialCreationOptions = []
PublicKeyCredentialCreationOptionsJson = []
PublicKeyCredentialDescriptor = []
PublicKeyCredentialDescriptorJson = []
PublicKeyCredentialEntity = []
PublicKeyCredentialHints = []
PublicKeyCredentialParameters = []
PublicKeyCredentialRequestOptions = []
PublicKeyCredentialRequestOptionsJson = []
PublicKeyCredentialRpEntity = []
PublicKeyCredentialType = []
PublicKeyCredentialUserEntity = []
PublicKeyCredentialUserEntityJson = []
PushEncryptionKeyName = []
PushEvent = ["Event", "ExtendableEvent"]
PushEventInit = []
Expand Down Expand Up @@ -1042,6 +1062,7 @@ RegisterRequest = []
RegisterResponse = []
RegisteredKey = []
RegistrationOptions = []
RegistrationResponseJson = []
Request = []
RequestCache = []
RequestCredentials = []
Expand All @@ -1051,6 +1072,7 @@ RequestInit = []
RequestMediaKeySystemAccessNotification = []
RequestMode = []
RequestRedirect = []
ResidentKeyRequirement = []
ResizeObserver = []
ResizeObserverBoxOptions = []
ResizeObserverEntry = []
Expand Down Expand Up @@ -1386,6 +1408,8 @@ TextTrackList = ["EventTarget"]
TextTrackMode = []
TimeEvent = ["Event"]
TimeRanges = []
TokenBinding = []
TokenBindingStatus = []
Touch = []
TouchEvent = ["Event", "UiEvent"]
TouchEventInit = []
Expand Down
Expand Up @@ -10,4 +10,5 @@ pub enum AttestationConveyancePreference {
None = "none",
Indirect = "indirect",
Direct = "direct",
Enterprise = "enterprise",
}
Expand Up @@ -12,6 +12,30 @@ extern "C" {
pub type AuthenticationExtensionsClientInputs;
#[wasm_bindgen(method, setter = "appid")]
fn appid_shim(this: &AuthenticationExtensionsClientInputs, val: &str);
#[wasm_bindgen(method, setter = "appidExclude")]
fn appid_exclude_shim(this: &AuthenticationExtensionsClientInputs, val: &str);
#[wasm_bindgen(method, setter = "credProps")]
fn cred_props_shim(this: &AuthenticationExtensionsClientInputs, val: bool);
#[cfg(feature = "AuthenticationExtensionsLargeBlobInputs")]
#[wasm_bindgen(method, setter = "largeBlob")]
fn large_blob_shim(
this: &AuthenticationExtensionsClientInputs,
val: &AuthenticationExtensionsLargeBlobInputs,
);
#[cfg(feature = "AuthenticationExtensionsPrfInputs")]
#[wasm_bindgen(method, setter = "prf")]
fn prf_shim(
this: &AuthenticationExtensionsClientInputs,
val: &AuthenticationExtensionsPrfInputs,
);
#[cfg(feature = "AuthenticationExtensionsSupplementalPubKeysInputs")]
#[wasm_bindgen(method, setter = "supplementalPubKeys")]
fn supplemental_pub_keys_shim(
this: &AuthenticationExtensionsClientInputs,
val: &AuthenticationExtensionsSupplementalPubKeysInputs,
);
#[wasm_bindgen(method, setter = "uvm")]
fn uvm_shim(this: &AuthenticationExtensionsClientInputs, val: bool);
}
impl AuthenticationExtensionsClientInputs {
#[doc = "Construct a new `AuthenticationExtensionsClientInputs`."]
Expand All @@ -29,6 +53,54 @@ impl AuthenticationExtensionsClientInputs {
self.appid_shim(val);
self
}
#[doc = "Change the `appidExclude` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"]
pub fn appid_exclude(&mut self, val: &str) -> &mut Self {
self.appid_exclude_shim(val);
self
}
#[doc = "Change the `credProps` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"]
pub fn cred_props(&mut self, val: bool) -> &mut Self {
self.cred_props_shim(val);
self
}
#[cfg(feature = "AuthenticationExtensionsLargeBlobInputs")]
#[doc = "Change the `largeBlob` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `AuthenticationExtensionsLargeBlobInputs`*"]
pub fn large_blob(&mut self, val: &AuthenticationExtensionsLargeBlobInputs) -> &mut Self {
self.large_blob_shim(val);
self
}
#[cfg(feature = "AuthenticationExtensionsPrfInputs")]
#[doc = "Change the `prf` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `AuthenticationExtensionsPrfInputs`*"]
pub fn prf(&mut self, val: &AuthenticationExtensionsPrfInputs) -> &mut Self {
self.prf_shim(val);
self
}
#[cfg(feature = "AuthenticationExtensionsSupplementalPubKeysInputs")]
#[doc = "Change the `supplementalPubKeys` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `AuthenticationExtensionsSupplementalPubKeysInputs`*"]
pub fn supplemental_pub_keys(
&mut self,
val: &AuthenticationExtensionsSupplementalPubKeysInputs,
) -> &mut Self {
self.supplemental_pub_keys_shim(val);
self
}
#[doc = "Change the `uvm` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"]
pub fn uvm(&mut self, val: bool) -> &mut Self {
self.uvm_shim(val);
self
}
}
impl Default for AuthenticationExtensionsClientInputs {
fn default() -> Self {
Expand Down
@@ -0,0 +1,28 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = AuthenticationExtensionsClientInputsJSON)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AuthenticationExtensionsClientInputsJson` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputsJson`*"]
pub type AuthenticationExtensionsClientInputsJson;
}
impl AuthenticationExtensionsClientInputsJson {
#[doc = "Construct a new `AuthenticationExtensionsClientInputsJson`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputsJson`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
}
impl Default for AuthenticationExtensionsClientInputsJson {
fn default() -> Self {
Self::new()
}
}
Expand Up @@ -12,6 +12,34 @@ extern "C" {
pub type AuthenticationExtensionsClientOutputs;
#[wasm_bindgen(method, setter = "appid")]
fn appid_shim(this: &AuthenticationExtensionsClientOutputs, val: bool);
#[wasm_bindgen(method, setter = "appidExclude")]
fn appid_exclude_shim(this: &AuthenticationExtensionsClientOutputs, val: bool);
#[cfg(feature = "CredentialPropertiesOutput")]
#[wasm_bindgen(method, setter = "credProps")]
fn cred_props_shim(
this: &AuthenticationExtensionsClientOutputs,
val: &CredentialPropertiesOutput,
);
#[cfg(feature = "AuthenticationExtensionsLargeBlobOutputs")]
#[wasm_bindgen(method, setter = "largeBlob")]
fn large_blob_shim(
this: &AuthenticationExtensionsClientOutputs,
val: &AuthenticationExtensionsLargeBlobOutputs,
);
#[cfg(feature = "AuthenticationExtensionsPrfOutputs")]
#[wasm_bindgen(method, setter = "prf")]
fn prf_shim(
this: &AuthenticationExtensionsClientOutputs,
val: &AuthenticationExtensionsPrfOutputs,
);
#[cfg(feature = "AuthenticationExtensionsSupplementalPubKeysOutputs")]
#[wasm_bindgen(method, setter = "supplementalPubKeys")]
fn supplemental_pub_keys_shim(
this: &AuthenticationExtensionsClientOutputs,
val: &AuthenticationExtensionsSupplementalPubKeysOutputs,
);
#[wasm_bindgen(method, setter = "uvm")]
fn uvm_shim(this: &AuthenticationExtensionsClientOutputs, val: &::wasm_bindgen::JsValue);
}
impl AuthenticationExtensionsClientOutputs {
#[doc = "Construct a new `AuthenticationExtensionsClientOutputs`."]
Expand All @@ -29,6 +57,55 @@ impl AuthenticationExtensionsClientOutputs {
self.appid_shim(val);
self
}
#[doc = "Change the `appidExclude` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"]
pub fn appid_exclude(&mut self, val: bool) -> &mut Self {
self.appid_exclude_shim(val);
self
}
#[cfg(feature = "CredentialPropertiesOutput")]
#[doc = "Change the `credProps` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`, `CredentialPropertiesOutput`*"]
pub fn cred_props(&mut self, val: &CredentialPropertiesOutput) -> &mut Self {
self.cred_props_shim(val);
self
}
#[cfg(feature = "AuthenticationExtensionsLargeBlobOutputs")]
#[doc = "Change the `largeBlob` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`, `AuthenticationExtensionsLargeBlobOutputs`*"]
pub fn large_blob(&mut self, val: &AuthenticationExtensionsLargeBlobOutputs) -> &mut Self {
self.large_blob_shim(val);
self
}
#[cfg(feature = "AuthenticationExtensionsPrfOutputs")]
#[doc = "Change the `prf` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`, `AuthenticationExtensionsPrfOutputs`*"]
pub fn prf(&mut self, val: &AuthenticationExtensionsPrfOutputs) -> &mut Self {
self.prf_shim(val);
self
}
#[cfg(feature = "AuthenticationExtensionsSupplementalPubKeysOutputs")]
#[doc = "Change the `supplementalPubKeys` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`, `AuthenticationExtensionsSupplementalPubKeysOutputs`*"]
pub fn supplemental_pub_keys(
&mut self,
val: &AuthenticationExtensionsSupplementalPubKeysOutputs,
) -> &mut Self {
self.supplemental_pub_keys_shim(val);
self
}
#[doc = "Change the `uvm` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"]
pub fn uvm(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
self.uvm_shim(val);
self
}
}
impl Default for AuthenticationExtensionsClientOutputs {
fn default() -> Self {
Expand Down
@@ -0,0 +1,28 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = AuthenticationExtensionsClientOutputsJSON)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AuthenticationExtensionsClientOutputsJson` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputsJson`*"]
pub type AuthenticationExtensionsClientOutputsJson;
}
impl AuthenticationExtensionsClientOutputsJson {
#[doc = "Construct a new `AuthenticationExtensionsClientOutputsJson`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputsJson`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
}
impl Default for AuthenticationExtensionsClientOutputsJson {
fn default() -> Self {
Self::new()
}
}
@@ -0,0 +1,55 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = AuthenticationExtensionsLargeBlobInputs)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `AuthenticationExtensionsLargeBlobInputs` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsLargeBlobInputs`*"]
pub type AuthenticationExtensionsLargeBlobInputs;
#[wasm_bindgen(method, setter = "read")]
fn read_shim(this: &AuthenticationExtensionsLargeBlobInputs, val: bool);
#[wasm_bindgen(method, setter = "support")]
fn support_shim(this: &AuthenticationExtensionsLargeBlobInputs, val: &str);
#[wasm_bindgen(method, setter = "write")]
fn write_shim(this: &AuthenticationExtensionsLargeBlobInputs, val: &::js_sys::Object);
}
impl AuthenticationExtensionsLargeBlobInputs {
#[doc = "Construct a new `AuthenticationExtensionsLargeBlobInputs`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsLargeBlobInputs`*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[doc = "Change the `read` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsLargeBlobInputs`*"]
pub fn read(&mut self, val: bool) -> &mut Self {
self.read_shim(val);
self
}
#[doc = "Change the `support` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsLargeBlobInputs`*"]
pub fn support(&mut self, val: &str) -> &mut Self {
self.support_shim(val);
self
}
#[doc = "Change the `write` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsLargeBlobInputs`*"]
pub fn write(&mut self, val: &::js_sys::Object) -> &mut Self {
self.write_shim(val);
self
}
}
impl Default for AuthenticationExtensionsLargeBlobInputs {
fn default() -> Self {
Self::new()
}
}

0 comments on commit dfe8272

Please sign in to comment.