pub struct Ctap20Authenticator<'a, T: Token, U: UiCallback> { /* private fields */ }
ctap2
only.Expand description
CTAP 2.0 protocol implementation.
Implementations§
Source§impl<'a, T: Token, U: UiCallback> Ctap20Authenticator<'a, T, U>
impl<'a, T: Token, U: UiCallback> 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 feature 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 feature 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 feature 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 feature 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<T: Token, U: UiCallback> AuthenticatorBackendHashedClientData for Ctap20Authenticator<'_, T, U>
impl<T: Token, U: UiCallback> AuthenticatorBackendHashedClientData for Ctap20Authenticator<'_, T, U>
fn perform_register( &mut self, client_data_hash: Vec<u8>, options: PublicKeyCredentialCreationOptions, _timeout_ms: u32, ) -> Result<RegisterPublicKeyCredential, WebauthnCError>
fn perform_auth( &mut self, client_data_hash: Vec<u8>, options: PublicKeyCredentialRequestOptions, _timeout_ms: u32, ) -> Result<PublicKeyCredential, WebauthnCError>
Source§impl<'a, T: Debug + Token, U: Debug + UiCallback> Debug for Ctap20Authenticator<'a, T, U>
impl<'a, T: Debug + Token, U: Debug + UiCallback> Debug for Ctap20Authenticator<'a, T, U>
Source§impl<'a, T: Token + SoloKeyToken, U: UiCallback> SoloKeyAuthenticator for Ctap20Authenticator<'a, T, U>
Available on crate feature vendor-solokey
only.
impl<'a, T: Token + SoloKeyToken, U: UiCallback> SoloKeyAuthenticator for Ctap20Authenticator<'a, T, U>
vendor-solokey
only.Source§fn get_solokey_lock<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<bool, WebauthnCError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_solokey_lock<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<bool, WebauthnCError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_solokey_random<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<[u8; 57], WebauthnCError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_solokey_random<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<[u8; 57], WebauthnCError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_solokey_uuid<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Uuid, WebauthnCError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_solokey_uuid<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<Uuid, WebauthnCError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_solokey_version<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u32, WebauthnCError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_solokey_version<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<u32, WebauthnCError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl<'a, T: Token + YubiKeyToken, U: UiCallback> YubiKeyAuthenticator for Ctap20Authenticator<'a, T, U>
Available on crate feature vendor-yubikey
only.
impl<'a, T: Token + YubiKeyToken, U: UiCallback> YubiKeyAuthenticator for Ctap20Authenticator<'a, T, U>
vendor-yubikey
only.