pub struct DeviceAuthnKey {
pub attestation: Option<Box<DeviceAuthnAttestation>>,
pub client_key_id: Option<String>,
pub created_at: Option<String>,
pub device_name: Option<String>,
pub device_type: Option<String>,
pub public_key: Option<Vec<i32>>,
pub state: Option<String>,
pub version: Option<i64>,
}Fields§
§attestation: Option<Box<DeviceAuthnAttestation>>§client_key_id: Option<String>ClientKeyID is a client-chosen id for the key and is unique per identity.
created_at: Option<String>CreatedAt is the timestamp of when the key was created. Only used for troubleshooting/UI.
device_name: Option<String>DeviceName is a human readable name for the device, helping the user to distinguish it from others.
device_type: Option<String>§public_key: Option<Vec<i32>>PublicKey is an EC (in v1) public key, used to verify signatures, stored as uncompressed bytes. The private key resides inside the device and does not exist on the server.
state: Option<String>§version: Option<i64>v1 uses SHA256 + EC256. v2 (in the future) may use ML-DSA which is post-quantum resistant. This requires Android/iOS support so we have to wait. We intentionally avoid storing the cryptographic algorithm here a la JWT/TLS to avoid security issues and algorithm negotiation.
Implementations§
Source§impl DeviceAuthnKey
impl DeviceAuthnKey
pub fn new() -> DeviceAuthnKey
Trait Implementations§
Source§impl Clone for DeviceAuthnKey
impl Clone for DeviceAuthnKey
Source§fn clone(&self) -> DeviceAuthnKey
fn clone(&self) -> DeviceAuthnKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceAuthnKey
impl Debug for DeviceAuthnKey
Source§impl Default for DeviceAuthnKey
impl Default for DeviceAuthnKey
Source§fn default() -> DeviceAuthnKey
fn default() -> DeviceAuthnKey
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DeviceAuthnKey
impl<'de> Deserialize<'de> for DeviceAuthnKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DeviceAuthnKey
impl PartialEq for DeviceAuthnKey
Source§fn eq(&self, other: &DeviceAuthnKey) -> bool
fn eq(&self, other: &DeviceAuthnKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DeviceAuthnKey
impl Serialize for DeviceAuthnKey
impl StructuralPartialEq for DeviceAuthnKey
Auto Trait Implementations§
impl Freeze for DeviceAuthnKey
impl RefUnwindSafe for DeviceAuthnKey
impl Send for DeviceAuthnKey
impl Sync for DeviceAuthnKey
impl Unpin for DeviceAuthnKey
impl UnsafeUnpin for DeviceAuthnKey
impl UnwindSafe for DeviceAuthnKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more