pub struct MakeCredentialRequest { /* private fields */ }Expand description
Request for creating a new credential (authenticatorMakeCredential)
Use the builder pattern to construct requests with optional parameters.
Implementations§
Source§impl MakeCredentialRequest
impl MakeCredentialRequest
Sourcepub fn new(
client_data_hash: ClientDataHash,
rp: RelyingParty,
user: User,
) -> Self
pub fn new( client_data_hash: ClientDataHash, rp: RelyingParty, user: User, ) -> Self
Create a new MakeCredentialRequest with required parameters
§Arguments
client_data_hash- SHA-256 hash of the WebAuthn client datarp- Relying party information (ID and optional name)user- User information (ID, name, optional display name)
Sourcepub fn with_pin_uv_auth(self, auth: PinUvAuth) -> Self
pub fn with_pin_uv_auth(self, auth: PinUvAuth) -> Self
Set the PIN/UV authentication parameter
Sourcepub fn with_timeout(self, timeout_ms: i32) -> Self
pub fn with_timeout(self, timeout_ms: i32) -> Self
Set the timeout in milliseconds (default: 30000ms)
Sourcepub fn with_resident_key(self, resident_key: bool) -> Self
pub fn with_resident_key(self, resident_key: bool) -> Self
Set whether to create a resident key (discoverable credential)
Sourcepub fn with_user_verification(self, user_verification: bool) -> Self
pub fn with_user_verification(self, user_verification: bool) -> Self
Set whether to require user verification
Sourcepub fn client_data_hash(&self) -> &ClientDataHash
pub fn client_data_hash(&self) -> &ClientDataHash
Get the client data hash
Sourcepub fn rp(&self) -> &RelyingParty
pub fn rp(&self) -> &RelyingParty
Get the relying party information
Sourcepub fn pin_uv_auth(&self) -> Option<&PinUvAuth>
pub fn pin_uv_auth(&self) -> Option<&PinUvAuth>
Get the PIN/UV authentication parameter if set
Sourcepub fn timeout_ms(&self) -> i32
pub fn timeout_ms(&self) -> i32
Get the timeout in milliseconds
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MakeCredentialRequest
impl RefUnwindSafe for MakeCredentialRequest
impl Send for MakeCredentialRequest
impl Sync for MakeCredentialRequest
impl Unpin for MakeCredentialRequest
impl UnwindSafe for MakeCredentialRequest
Blanket Implementations§
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
Mutably borrows from an owned value. Read more