pub trait UserValidationMethod {
    // Required methods
    fn check_user_verification<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn check_user_presence<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn is_presence_enabled(&self) -> bool;
    fn is_verification_enabled(&self) -> Option<bool>;
}
Expand description

Pluggable trait for the Authenticator to do user interaction and verification.

Required Methods§

source

fn check_user_verification<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Check for user verification user a user gesture and confirmation if this operation passes both the user presence and user verification flags will be enabled

source

fn check_user_presence<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Used when only the user’s presence is required, not their verification. For that see check_user_verification. This will capture the user’s consent to the operation.

source

fn is_presence_enabled(&self) -> bool

Indicates whether this type is capable of testing user presence.

source

fn is_verification_enabled(&self) -> Option<bool>

Indicates that this type is capable of verifying the user within itself. For example, devices with UI, biometrics fall into this category.

If Some(true), it indicates that the device is capable of user verification within itself and has been configured.

If Some(false), it indicates that the device is capable of user verification within itself and has not been yet configured. For example, a biometric device that has not yet been configured will return this parameter set to false.

If None, it indicates that the device is not capable of user verification within itself.

A device that can only do Client PIN will set this to None.

If a device is capable of verifying the user within itself as well as able to do Client PIN, it will return both Some and the Client PIN option.

Implementors§