pub trait DeviceAuthKeyStore: Send + Sync {
// Required methods
fn create_record<'life0, 'async_trait>(
&'life0 mut self,
record: DeviceAuthKeyRecord,
) -> Pin<Box<dyn Future<Output = Result<(), DeviceAuthKeyError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_metadata<'life0, 'async_trait>(
&'life0 mut self,
metadata: DeviceAuthKeyMetadata,
) -> Pin<Box<dyn Future<Output = Result<(), DeviceAuthKeyError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceAuthKeyMetadata>, DeviceAuthKeyError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_record<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceAuthKeyRecord>, DeviceAuthKeyError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_record_and_metadata<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), DeviceAuthKeyError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A trait used to interact with the device auth key data on the device.
Required Methods§
Sourcefn create_record<'life0, 'async_trait>(
&'life0 mut self,
record: DeviceAuthKeyRecord,
) -> Pin<Box<dyn Future<Output = Result<(), DeviceAuthKeyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_record<'life0, 'async_trait>(
&'life0 mut self,
record: DeviceAuthKeyRecord,
) -> Pin<Box<dyn Future<Output = Result<(), DeviceAuthKeyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a record (private key material).
The record should be stored in device-bound storage and protected with user-verifying access controls.
Sourcefn create_metadata<'life0, 'async_trait>(
&'life0 mut self,
metadata: DeviceAuthKeyMetadata,
) -> Pin<Box<dyn Future<Output = Result<(), DeviceAuthKeyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_metadata<'life0, 'async_trait>(
&'life0 mut self,
metadata: DeviceAuthKeyMetadata,
) -> Pin<Box<dyn Future<Output = Result<(), DeviceAuthKeyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create metadata for the device auth key.
The metadata should be stored separately without access controls that require UI.
Sourcefn get_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceAuthKeyMetadata>, DeviceAuthKeyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceAuthKeyMetadata>, DeviceAuthKeyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieve the device auth key metadata.
Sourcefn get_record<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceAuthKeyRecord>, DeviceAuthKeyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_record<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<DeviceAuthKeyRecord>, DeviceAuthKeyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieve the device auth key private key material.
Sourcefn delete_record_and_metadata<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), DeviceAuthKeyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_record_and_metadata<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), DeviceAuthKeyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete the device auth key (both the record and metadata) from the device.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".