pub trait WriteAuth:
Send
+ Sync
+ Debug {
// Required methods
fn verify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
record: &'life1 [u8],
sigs: &'life2 [Sig],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn auth_type(&self) -> &str;
}Expand description
Trait for verifying write authority on records.
This trait enables pluggable authentication mechanisms for multi-writer records in the DHT.
Required Methods§
Sourcefn verify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
record: &'life1 [u8],
sigs: &'life2 [Sig],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn verify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
record: &'life1 [u8],
sigs: &'life2 [Sig],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Verify that the given signatures authorize the write operation for the given record data.