#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct PublicKeyCredentialDescriptor {
pub r#type: ::prost::alloc::string::String,
pub id: ::prost::alloc::string::String,
#[serde(default)]
pub transports: Vec<AuthenticatorTransport>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct AuthenticatorAssertionResponse {
pub client_data_json: ::prost::alloc::string::String,
pub authenticator_data: ::prost::alloc::string::String,
pub signature: ::prost::alloc::string::String,
#[serde(default)]
pub user_handle: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct AuthenticatorAttestationResponse {
pub client_data_json: ::prost::alloc::string::String,
pub attestation_object: ::prost::alloc::string::String,
#[serde(default)]
pub transports: Vec<AuthenticatorTransport>,
#[serde(default)]
pub authenticator_attachment: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct PublicKeyCredentialWithAttestation {
pub id: ::prost::alloc::string::String,
pub r#type: ::prost::alloc::string::String,
pub raw_id: ::prost::alloc::string::String,
#[serde(default)]
pub authenticator_attachment: ::core::option::Option<::prost::alloc::string::String>,
#[serde(default)]
pub response: ::core::option::Option<AuthenticatorAttestationResponse>,
#[serde(default)]
pub client_extension_results: ::core::option::Option<SimpleClientExtensionResults>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct PublicKeyCredentialWithAssertion {
pub id: ::prost::alloc::string::String,
pub r#type: ::prost::alloc::string::String,
pub raw_id: ::prost::alloc::string::String,
#[serde(default)]
pub authenticator_attachment: ::core::option::Option<::prost::alloc::string::String>,
#[serde(default)]
pub response: ::core::option::Option<AuthenticatorAssertionResponse>,
#[serde(default)]
pub client_extension_results: ::core::option::Option<SimpleClientExtensionResults>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, Copy, PartialEq)]
pub struct SimpleClientExtensionResults {
#[serde(default)]
pub appid: ::core::option::Option<bool>,
#[serde(default)]
pub appid_exclude: ::core::option::Option<bool>,
#[serde(default)]
pub cred_props: ::core::option::Option<
CredPropsAuthenticationExtensionsClientOutputs,
>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, Copy, PartialEq)]
pub struct CredPropsAuthenticationExtensionsClientOutputs {
#[serde(default)]
pub rk: bool,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum AuthenticatorTransport {
#[serde(rename = "AUTHENTICATOR_TRANSPORT_UNSPECIFIED")]
Unspecified = 0,
#[serde(rename = "AUTHENTICATOR_TRANSPORT_BLE")]
Ble = 1,
#[serde(rename = "AUTHENTICATOR_TRANSPORT_INTERNAL")]
Internal = 2,
#[serde(rename = "AUTHENTICATOR_TRANSPORT_NFC")]
Nfc = 3,
#[serde(rename = "AUTHENTICATOR_TRANSPORT_USB")]
Usb = 4,
#[serde(rename = "AUTHENTICATOR_TRANSPORT_HYBRID")]
Hybrid = 5,
}
impl AuthenticatorTransport {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "AUTHENTICATOR_TRANSPORT_UNSPECIFIED",
Self::Ble => "AUTHENTICATOR_TRANSPORT_BLE",
Self::Internal => "AUTHENTICATOR_TRANSPORT_INTERNAL",
Self::Nfc => "AUTHENTICATOR_TRANSPORT_NFC",
Self::Usb => "AUTHENTICATOR_TRANSPORT_USB",
Self::Hybrid => "AUTHENTICATOR_TRANSPORT_HYBRID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AUTHENTICATOR_TRANSPORT_UNSPECIFIED" => Some(Self::Unspecified),
"AUTHENTICATOR_TRANSPORT_BLE" => Some(Self::Ble),
"AUTHENTICATOR_TRANSPORT_INTERNAL" => Some(Self::Internal),
"AUTHENTICATOR_TRANSPORT_NFC" => Some(Self::Nfc),
"AUTHENTICATOR_TRANSPORT_USB" => Some(Self::Usb),
"AUTHENTICATOR_TRANSPORT_HYBRID" => Some(Self::Hybrid),
_ => None,
}
}
}