pub trait UserValidationMethod {
type PasskeyItem: TryInto<Passkey> + Send + Sync;
// Required methods
fn check_user<'a, 'life0, 'async_trait>(
&'life0 self,
credential: Option<&'a Self::PasskeyItem>,
presence: bool,
verification: bool,
) -> Pin<Box<dyn Future<Output = Result<UserCheck, Ctap2Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: '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 Associated Types§
Required Methods§
Sourcefn check_user<'a, 'life0, 'async_trait>(
&'life0 self,
credential: Option<&'a Self::PasskeyItem>,
presence: bool,
verification: bool,
) -> Pin<Box<dyn Future<Output = Result<UserCheck, Ctap2Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
fn check_user<'a, 'life0, 'async_trait>(
&'life0 self,
credential: Option<&'a Self::PasskeyItem>,
presence: bool,
verification: bool,
) -> Pin<Box<dyn Future<Output = Result<UserCheck, Ctap2Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
Check for the user’s presence and obtain consent for the operation. The operation may also require the user to be verified.
crdential
- Can be used to display additional information about the operation to the user.presence
- Indicates whether the user’s presence is required.verification
- Indicates whether the user should be verified.
Sourcefn is_presence_enabled(&self) -> bool
fn is_presence_enabled(&self) -> bool
Indicates whether this type is capable of testing user presence.
Sourcefn is_verification_enabled(&self) -> Option<bool>
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.