Client

Struct Client 

Source
pub struct Client;
Expand description

Client for communicating with FIDO2 authenticators

All methods are stateless and require an active Transport connection.

Implementations§

Source§

impl Client

Source

pub fn make_credential( transport: &mut Transport, request: MakeCredentialRequest, ) -> Result<Vec<u8>>

Create a new credential (WebAuthn registration)

Uses the builder pattern for type-safe, ergonomic credential creation.

Source

pub fn get_assertion( transport: &mut Transport, request: GetAssertionRequest, ) -> Result<Vec<u8>>

Get an assertion (WebAuthn authentication)

Uses the builder pattern for type-safe, ergonomic assertion retrieval.

Source

pub fn authenticator_get_info(transport: &mut Transport) -> Result<Vec<u8>>

Send authenticatorGetInfo command

Source

pub fn make_credential_buf( transport: &mut Transport, request: MakeCredentialRequest, response: &mut [u8], ) -> Result<usize>

Create a new credential (zero-allocation variant)

The caller provides a buffer to write the response into. Returns the number of bytes written.

Source

pub fn get_assertion_buf( transport: &mut Transport, request: GetAssertionRequest, response: &mut [u8], ) -> Result<usize>

Get an assertion (zero-allocation variant)

The caller provides a buffer to write the response into. Returns the number of bytes written.

Source

pub fn authenticator_get_info_buf( transport: &mut Transport, response: &mut [u8], ) -> Result<usize>

Send authenticatorGetInfo command (zero-allocation variant)

The caller provides a buffer to write the response into. Returns the number of bytes written.

Source

pub fn get_credentials_metadata( transport: &mut Transport, request: CredentialManagementRequest, ) -> Result<CredentialsMetadata>

Get credentials metadata (wrapper for credential_mgmt module)

Source

pub fn enumerate_rps_begin( transport: &mut Transport, request: CredentialManagementRequest, ) -> Result<RpEnumerationBeginResponse>

Begin RP enumeration (wrapper for credential_mgmt module)

Source

pub fn enumerate_rps_get_next(transport: &mut Transport) -> Result<RpInfo>

Get next RP in enumeration (wrapper for credential_mgmt module)

Source

pub fn enumerate_rps( transport: &mut Transport, request: CredentialManagementRequest, ) -> Result<Vec<RpInfo>>

Enumerate all RPs (wrapper for credential_mgmt module)

Source

pub fn enumerate_credentials_begin( transport: &mut Transport, request: EnumerateCredentialsRequest, ) -> Result<CredentialEnumerationBeginResponse>

Begin credential enumeration (wrapper for credential_mgmt module)

Source

pub fn enumerate_credentials_get_next( transport: &mut Transport, ) -> Result<CredentialInfo>

Get next credential (wrapper for credential_mgmt module)

Source

pub fn enumerate_credentials( transport: &mut Transport, request: EnumerateCredentialsRequest, ) -> Result<Vec<CredentialInfo>>

Enumerate all credentials (wrapper for credential_mgmt module)

Source

pub fn delete_credential( transport: &mut Transport, request: DeleteCredentialRequest, ) -> Result<()>

Delete a credential (wrapper for credential_mgmt module)

Source

pub fn update_user_information( transport: &mut Transport, request: UpdateUserRequest, ) -> Result<()>

Update user information (wrapper for credential_mgmt module)

Source

pub fn get_pin_token_for_credential_management( transport: &mut Transport, pin: &str, protocol: PinProtocol, ) -> Result<PinUvAuth>

Get a PIN/UV auth token for credential management operations

Handles the complete PIN authentication flow and returns a ready-to-use token.

Source

pub fn get_uv_token_for_credential_management( transport: &mut Transport, protocol: PinProtocol, ) -> Result<PinUvAuth>

Get a PIN/UV auth token using user verification (biometric/platform auth)

Attempts to get a PIN token using built-in user verification instead of PIN. Not all authenticators support this.

Auto Trait Implementations§

§

impl Freeze for Client

§

impl RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl UnwindSafe for Client

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V