Skip to main content

DeviceAuthKeyStore

Trait DeviceAuthKeyStore 

Source
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§

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Implementors§