#[derive(Debug, Clone, serde::Serialize)]
pub struct AddCredentialParams {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "credential")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub credential: crate::web_authn::types::Credential,
}
impl<'de> serde::Deserialize<'de> for AddCredentialParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AddCredentialParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "credential")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub credential: crate::web_authn::types::Credential,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AddCredentialParams {
authenticator_id: fields.authenticator_id,
credential: fields.credential,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct AddCredential;
#[derive(Debug, Clone, serde::Serialize)]
pub struct AddCredentialResponse {}
impl<'de> serde::Deserialize<'de> for AddCredentialResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AddCredentialResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AddCredentialResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for AddCredential {
type Params = AddCredentialParams;
type Response = AddCredentialResponse;
const METHOD: &'static str = "WebAuthn.addCredential";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct AddVirtualAuthenticatorParams {
#[serde(rename = "options")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub options: crate::web_authn::types::VirtualAuthenticatorOptions,
}
impl<'de> serde::Deserialize<'de> for AddVirtualAuthenticatorParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AddVirtualAuthenticatorParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "options")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub options: crate::web_authn::types::VirtualAuthenticatorOptions,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AddVirtualAuthenticatorParams {
options: fields.options,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct AddVirtualAuthenticator;
#[derive(Debug, Clone, serde::Serialize)]
pub struct AddVirtualAuthenticatorResponse {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
}
impl<'de> serde::Deserialize<'de> for AddVirtualAuthenticatorResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AddVirtualAuthenticatorResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AddVirtualAuthenticatorResponse {
authenticator_id: fields.authenticator_id,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for AddVirtualAuthenticator {
type Params = AddVirtualAuthenticatorParams;
type Response = AddVirtualAuthenticatorResponse;
const METHOD: &'static str = "WebAuthn.addVirtualAuthenticator";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ClearCredentialsParams {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
}
impl<'de> serde::Deserialize<'de> for ClearCredentialsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ClearCredentialsParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ClearCredentialsParams {
authenticator_id: fields.authenticator_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ClearCredentials;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ClearCredentialsResponse {}
impl<'de> serde::Deserialize<'de> for ClearCredentialsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ClearCredentialsResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ClearCredentialsResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ClearCredentials {
type Params = ClearCredentialsParams;
type Response = ClearCredentialsResponse;
const METHOD: &'static str = "WebAuthn.clearCredentials";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct DisableParams {}
impl<'de> serde::Deserialize<'de> for DisableParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DisableParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DisableParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct Disable;
#[derive(Debug, Clone, serde::Serialize)]
pub struct DisableResponse {}
impl<'de> serde::Deserialize<'de> for DisableResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DisableResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DisableResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for Disable {
type Params = DisableParams;
type Response = DisableResponse;
const METHOD: &'static str = "WebAuthn.disable";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct EnableParams {
#[serde(rename = "enableUI")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub enable_ui: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for EnableParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EnableParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "enableUI")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub enable_ui: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableParams {
enable_ui: fields.enable_ui,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct Enable;
#[derive(Debug, Clone, serde::Serialize)]
pub struct EnableResponse {}
impl<'de> serde::Deserialize<'de> for EnableResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EnableResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for Enable {
type Params = EnableParams;
type Response = EnableResponse;
const METHOD: &'static str = "WebAuthn.enable";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetCredentialParams {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "credentialId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub credential_id: String,
}
impl<'de> serde::Deserialize<'de> for GetCredentialParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetCredentialParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "credentialId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub credential_id: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetCredentialParams {
authenticator_id: fields.authenticator_id,
credential_id: fields.credential_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetCredential;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetCredentialResponse {
#[serde(rename = "credential")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub credential: crate::web_authn::types::Credential,
}
impl<'de> serde::Deserialize<'de> for GetCredentialResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetCredentialResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "credential")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub credential: crate::web_authn::types::Credential,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetCredentialResponse {
credential: fields.credential,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetCredential {
type Params = GetCredentialParams;
type Response = GetCredentialResponse;
const METHOD: &'static str = "WebAuthn.getCredential";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetCredentialsParams {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
}
impl<'de> serde::Deserialize<'de> for GetCredentialsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetCredentialsParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetCredentialsParams {
authenticator_id: fields.authenticator_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetCredentials;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetCredentialsResponse {
#[serde(rename = "credentials")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub credentials: Vec<crate::web_authn::types::Credential>,
}
impl<'de> serde::Deserialize<'de> for GetCredentialsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetCredentialsResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "credentials")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub credentials: Vec<crate::web_authn::types::Credential>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetCredentialsResponse {
credentials: fields.credentials,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetCredentials {
type Params = GetCredentialsParams;
type Response = GetCredentialsResponse;
const METHOD: &'static str = "WebAuthn.getCredentials";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct RemoveCredentialParams {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "credentialId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub credential_id: String,
}
impl<'de> serde::Deserialize<'de> for RemoveCredentialParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RemoveCredentialParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "credentialId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub credential_id: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RemoveCredentialParams {
authenticator_id: fields.authenticator_id,
credential_id: fields.credential_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct RemoveCredential;
#[derive(Debug, Clone, serde::Serialize)]
pub struct RemoveCredentialResponse {}
impl<'de> serde::Deserialize<'de> for RemoveCredentialResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RemoveCredentialResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RemoveCredentialResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for RemoveCredential {
type Params = RemoveCredentialParams;
type Response = RemoveCredentialResponse;
const METHOD: &'static str = "WebAuthn.removeCredential";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct RemoveVirtualAuthenticatorParams {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
}
impl<'de> serde::Deserialize<'de> for RemoveVirtualAuthenticatorParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RemoveVirtualAuthenticatorParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RemoveVirtualAuthenticatorParams {
authenticator_id: fields.authenticator_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct RemoveVirtualAuthenticator;
#[derive(Debug, Clone, serde::Serialize)]
pub struct RemoveVirtualAuthenticatorResponse {}
impl<'de> serde::Deserialize<'de> for RemoveVirtualAuthenticatorResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RemoveVirtualAuthenticatorResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RemoveVirtualAuthenticatorResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for RemoveVirtualAuthenticator {
type Params = RemoveVirtualAuthenticatorParams;
type Response = RemoveVirtualAuthenticatorResponse;
const METHOD: &'static str = "WebAuthn.removeVirtualAuthenticator";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetAutomaticPresenceSimulationParams {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "enabled")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub enabled: bool,
}
impl<'de> serde::Deserialize<'de> for SetAutomaticPresenceSimulationParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetAutomaticPresenceSimulationParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "enabled")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub enabled: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetAutomaticPresenceSimulationParams {
authenticator_id: fields.authenticator_id,
enabled: fields.enabled,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetAutomaticPresenceSimulation;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetAutomaticPresenceSimulationResponse {}
impl<'de> serde::Deserialize<'de> for SetAutomaticPresenceSimulationResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetAutomaticPresenceSimulationResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetAutomaticPresenceSimulationResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetAutomaticPresenceSimulation {
type Params = SetAutomaticPresenceSimulationParams;
type Response = SetAutomaticPresenceSimulationResponse;
const METHOD: &'static str = "WebAuthn.setAutomaticPresenceSimulation";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetCredentialPropertiesParams {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "credentialId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub credential_id: String,
#[serde(rename = "backupEligibility")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub backup_eligibility: Option<bool>,
#[serde(rename = "backupState")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub backup_state: Option<bool>,
#[serde(rename = "activeCmtgKeyIndex")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub active_cmtg_key_index: Option<i64>,
#[serde(rename = "generateCmtgKeyOnNextOperation")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub generate_cmtg_key_on_next_operation: Option<bool>,
#[serde(rename = "signCount")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub sign_count: Option<ydp_core::FiniteF64>,
}
impl<'de> serde::Deserialize<'de> for SetCredentialPropertiesParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetCredentialPropertiesParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "credentialId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub credential_id: String,
#[serde(rename = "backupEligibility")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub backup_eligibility: Option<bool>,
#[serde(rename = "backupState")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub backup_state: Option<bool>,
#[serde(rename = "activeCmtgKeyIndex")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub active_cmtg_key_index: Option<i64>,
#[serde(rename = "generateCmtgKeyOnNextOperation")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub generate_cmtg_key_on_next_operation: Option<bool>,
#[serde(rename = "signCount")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub sign_count: Option<ydp_core::FiniteF64>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetCredentialPropertiesParams {
authenticator_id: fields.authenticator_id,
credential_id: fields.credential_id,
backup_eligibility: fields.backup_eligibility,
backup_state: fields.backup_state,
active_cmtg_key_index: fields.active_cmtg_key_index,
generate_cmtg_key_on_next_operation: fields.generate_cmtg_key_on_next_operation,
sign_count: fields.sign_count,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetCredentialProperties;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetCredentialPropertiesResponse {}
impl<'de> serde::Deserialize<'de> for SetCredentialPropertiesResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetCredentialPropertiesResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetCredentialPropertiesResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetCredentialProperties {
type Params = SetCredentialPropertiesParams;
type Response = SetCredentialPropertiesResponse;
const METHOD: &'static str = "WebAuthn.setCredentialProperties";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetResponseOverrideBitsParams {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "isBogusSignature")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub is_bogus_signature: Option<bool>,
#[serde(rename = "isBadUV")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub is_bad_uv: Option<bool>,
#[serde(rename = "isBadUP")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub is_bad_up: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for SetResponseOverrideBitsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetResponseOverrideBitsParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "isBogusSignature")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub is_bogus_signature: Option<bool>,
#[serde(rename = "isBadUV")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub is_bad_uv: Option<bool>,
#[serde(rename = "isBadUP")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub is_bad_up: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetResponseOverrideBitsParams {
authenticator_id: fields.authenticator_id,
is_bogus_signature: fields.is_bogus_signature,
is_bad_uv: fields.is_bad_uv,
is_bad_up: fields.is_bad_up,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetResponseOverrideBits;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetResponseOverrideBitsResponse {}
impl<'de> serde::Deserialize<'de> for SetResponseOverrideBitsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetResponseOverrideBitsResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetResponseOverrideBitsResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetResponseOverrideBits {
type Params = SetResponseOverrideBitsParams;
type Response = SetResponseOverrideBitsResponse;
const METHOD: &'static str = "WebAuthn.setResponseOverrideBits";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetUserVerifiedParams {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "isUserVerified")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub is_user_verified: bool,
}
impl<'de> serde::Deserialize<'de> for SetUserVerifiedParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetUserVerifiedParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "authenticatorId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub authenticator_id: crate::web_authn::types::AuthenticatorId,
#[serde(rename = "isUserVerified")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub is_user_verified: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetUserVerifiedParams {
authenticator_id: fields.authenticator_id,
is_user_verified: fields.is_user_verified,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetUserVerified;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetUserVerifiedResponse {}
impl<'de> serde::Deserialize<'de> for SetUserVerifiedResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetUserVerifiedResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetUserVerifiedResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetUserVerified {
type Params = SetUserVerifiedParams;
type Response = SetUserVerifiedResponse;
const METHOD: &'static str = "WebAuthn.setUserVerified";
}