pub struct Ctap21PreAuthenticator<'a, T: Token, U: UiCallback> { /* private fields */ }ctap2 only.Expand description
CTAP 2.1-PRE protocol implementation.
This contains only CTAP 2.1-PRE-specific functionality. All CTAP 2.0 functionality is avaliable via a Deref to Ctap20Authenticator.
Methods from Deref<Target = Ctap20Authenticator<'a, T, U>>§
Sourcepub fn get_info(&self) -> &GetInfoResponse
pub fn get_info(&self) -> &GetInfoResponse
Gets cached information about the authenticator.
This does not transmit to the token.
Sourcepub async fn factory_reset(&mut self) -> Result<(), WebauthnCError>
Available on crate features ctap2-management only.
pub async fn factory_reset(&mut self) -> Result<(), WebauthnCError>
ctap2-management only.Perform a factory reset of the token, deleting all data.
Sourcepub fn validate_pin(&self, pin: &str) -> Result<String, WebauthnCError>
Available on crate features ctap2-management only.
pub fn validate_pin(&self, pin: &str) -> Result<String, WebauthnCError>
ctap2-management only.Checks whether a provided PIN follows the rules defined by the authenticator. This does not share the PIN with the authenticator.
Sourcepub async fn set_new_pin(&mut self, pin: &str) -> Result<(), WebauthnCError>
Available on crate features ctap2-management only.
pub async fn set_new_pin(&mut self, pin: &str) -> Result<(), WebauthnCError>
ctap2-management only.Sets a PIN on a device which does not already have one.
To change a PIN, use change_pin().
Sourcepub async fn change_pin(
&mut self,
old_pin: &str,
new_pin: &str,
) -> Result<(), WebauthnCError>
Available on crate features ctap2-management only.
pub async fn change_pin( &mut self, old_pin: &str, new_pin: &str, ) -> Result<(), WebauthnCError>
ctap2-management only.Changes a PIN on a device.
To set a PIN for the first time, use set_new_pin().
Sourcepub async fn selection(&mut self) -> Result<(), WebauthnCError>
pub async fn selection(&mut self) -> Result<(), WebauthnCError>
Prompt for user presence on an authenticator.
On CTAP 2.1 authenticators, this sends a SelectionRequest.
On CTAP 2.0 and 2.1-PRE authenticators (where there is no SelectionRequest), this performs a MakeCredentialRequest with invalid PIN/UV auth parameters, using the process described in CTAP 2.1 § 6.1.2 authenticatorMakeCredential Algorithm step 1.
While this shouldn’t result in an authenticator lock-out (according to
the spec), it has been observed that some authenticators will decrement
their pinAttempts counter.
§References
- CTAP 2.1 §6.1.2 authenticatorMakeCredential Algorithm, step 1.
Trait Implementations§
Source§impl<'a, T: Debug + Token, U: Debug + UiCallback> Debug for Ctap21PreAuthenticator<'a, T, U>
impl<'a, T: Debug + Token, U: Debug + UiCallback> Debug for Ctap21PreAuthenticator<'a, T, U>
Source§impl<'a, T: Token, U: UiCallback> Deref for Ctap21PreAuthenticator<'a, T, U>
For backwards compatibility, pretend to be a
CTAP 2.0 authenticator.
impl<'a, T: Token, U: UiCallback> Deref for Ctap21PreAuthenticator<'a, T, U>
For backwards compatibility, pretend to be a CTAP 2.0 authenticator.
Source§impl<T: Token, U: UiCallback> DerefMut for Ctap21PreAuthenticator<'_, T, U>
impl<T: Token, U: UiCallback> DerefMut for Ctap21PreAuthenticator<'_, T, U>
Auto Trait Implementations§
impl<'a, T, U> Freeze for Ctap21PreAuthenticator<'a, T, U>where
T: Freeze,
impl<'a, T, U> RefUnwindSafe for Ctap21PreAuthenticator<'a, T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<'a, T, U> Send for Ctap21PreAuthenticator<'a, T, U>
impl<'a, T, U> Sync for Ctap21PreAuthenticator<'a, T, U>
impl<'a, T, U> Unpin for Ctap21PreAuthenticator<'a, T, U>where
T: Unpin,
impl<'a, T, U> UnwindSafe for Ctap21PreAuthenticator<'a, T, U>where
T: UnwindSafe,
U: RefUnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, K, T, U, R> BiometricAuthenticator for Twhere
K: Token,
T: BiometricAuthenticatorInfo<U, RequestType = R> + Deref<Target = Ctap20Authenticator<'a, K, U>, Target = Ctap20Authenticator<'a, K, U>> + DerefMut,
U: UiCallback + 'a,
R: BioEnrollmentRequestTrait,
impl<'a, K, T, U, R> BiometricAuthenticator for Twhere
K: Token,
T: BiometricAuthenticatorInfo<U, RequestType = R> + Deref<Target = Ctap20Authenticator<'a, K, U>, Target = Ctap20Authenticator<'a, K, U>> + DerefMut,
U: UiCallback + 'a,
R: BioEnrollmentRequestTrait,
Source§fn check_fingerprint_support<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn check_fingerprint_support<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
ctap2 only.Source§fn check_friendly_name<'life0, 'async_trait>(
&'life0 mut self,
friendly_name: String,
) -> Pin<Box<dyn Future<Output = Result<String, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn check_friendly_name<'life0, 'async_trait>(
&'life0 mut self,
friendly_name: String,
) -> Pin<Box<dyn Future<Output = Result<String, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
ctap2 only.friendly_name complies with authenticator limits,
and returns the value in Unicode Normal Form C. Read moreSource§fn get_fingerprint_sensor_info<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<BioEnrollmentResponse, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn get_fingerprint_sensor_info<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<BioEnrollmentResponse, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
ctap2 only.Source§fn enroll_fingerprint<'life0, 'async_trait>(
&'life0 mut self,
timeout: Duration,
friendly_name: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn enroll_fingerprint<'life0, 'async_trait>(
&'life0 mut self,
timeout: Duration,
friendly_name: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
ctap2 only.Source§fn list_fingerprints<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<TemplateInfo>, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn list_fingerprints<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<TemplateInfo>, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
ctap2 only.Source§fn rename_fingerprint<'life0, 'async_trait>(
&'life0 mut self,
id: Vec<u8>,
friendly_name: String,
) -> Pin<Box<dyn Future<Output = Result<(), WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn rename_fingerprint<'life0, 'async_trait>(
&'life0 mut self,
id: Vec<u8>,
friendly_name: String,
) -> Pin<Box<dyn Future<Output = Result<(), WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
ctap2 only.Source§fn remove_fingerprint<'life0, 'async_trait>(
&'life0 mut self,
id: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn remove_fingerprint<'life0, 'async_trait>(
&'life0 mut self,
id: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
ctap2 only.Source§fn remove_fingerprints<'life0, 'async_trait>(
&'life0 mut self,
ids: Vec<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<(), WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn remove_fingerprints<'life0, 'async_trait>(
&'life0 mut self,
ids: Vec<Vec<u8>>,
) -> Pin<Box<dyn Future<Output = Result<(), WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
ctap2 only.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<'a, K, T, U, R> CredentialManagementAuthenticator for Twhere
K: Token,
T: CredentialManagementAuthenticatorInfo<U, RequestType = R> + Deref<Target = Ctap20Authenticator<'a, K, U>, Target = Ctap20Authenticator<'a, K, U>> + DerefMut,
U: UiCallback + 'a,
R: CredentialManagementRequestTrait,
impl<'a, K, T, U, R> CredentialManagementAuthenticator for Twhere
K: Token,
T: CredentialManagementAuthenticatorInfo<U, RequestType = R> + Deref<Target = Ctap20Authenticator<'a, K, U>, Target = Ctap20Authenticator<'a, K, U>> + DerefMut,
U: UiCallback + 'a,
R: CredentialManagementRequestTrait,
Source§fn check_credential_management_support(&self) -> Result<(), WebauthnCError>
fn check_credential_management_support(&self) -> Result<(), WebauthnCError>
ctap2 only.Source§fn get_credentials_metadata<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<CredentialStorageMetadata, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn get_credentials_metadata<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<CredentialStorageMetadata, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
ctap2 only.Source§fn enumerate_rps<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<RelyingPartyCM>, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn enumerate_rps<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Vec<RelyingPartyCM>, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
ctap2 only.Source§fn enumerate_credentials_by_hash<'life0, 'async_trait>(
&'life0 mut self,
rp_id_hash: [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<Vec<DiscoverableCredential>, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn enumerate_credentials_by_hash<'life0, 'async_trait>(
&'life0 mut self,
rp_id_hash: [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<Vec<DiscoverableCredential>, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
ctap2 only.Source§fn enumerate_credentials_by_rpid<'life0, 'life1, 'async_trait>(
&'life0 mut self,
rp_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<DiscoverableCredential>, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn enumerate_credentials_by_rpid<'life0, 'life1, 'async_trait>(
&'life0 mut self,
rp_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<DiscoverableCredential>, WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
ctap2 only.Source§fn delete_credential<'life0, 'async_trait>(
&'life0 mut self,
credential_id: PublicKeyCredentialDescriptorCM,
) -> Pin<Box<dyn Future<Output = Result<(), WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn delete_credential<'life0, 'async_trait>(
&'life0 mut self,
credential_id: PublicKeyCredentialDescriptorCM,
) -> Pin<Box<dyn Future<Output = Result<(), WebauthnCError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
ctap2 only.