pub struct CredentialBuilder { /* private fields */ }Expand description
Builder for Credential.
Implementations§
Source§impl CredentialBuilder
impl CredentialBuilder
pub fn credential_id<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn is_resident_credential<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
Sourcepub fn rp_id<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn rp_id<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Relying Party ID the credential is scoped to. Must be set when adding a credential.
Sourcepub fn private_key<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn private_key<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The ECDSA P-256 private key in PKCS#8 format.
Sourcepub fn user_handle<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn user_handle<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user.
Sourcepub fn sign_count<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
pub fn sign_count<VALUE: Into<JsUInt>>(&mut self, value: VALUE) -> &mut Self
Signature counter. This is incremented by one for each successful assertion. See https://w3c.github.io/webauthn/#signature-counter
Sourcepub fn large_blob<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn large_blob<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The large blob associated with the credential. See https://w3c.github.io/webauthn/#sctn-large-blob-extension
Sourcepub fn backup_eligibility<VALUE: Into<bool>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn backup_eligibility<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
Assertions returned by this credential will have the backup eligibility (BE) flag set to this value. Defaults to the authenticator’s defaultBackupEligibility value.
Sourcepub fn backup_state<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn backup_state<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Assertions returned by this credential will have the backup state (BS) flag set to this value. Defaults to the authenticator’s defaultBackupState value.
Sourcepub fn user_name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn user_name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The credential’s user.name property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialentity-name
Sourcepub fn user_display_name<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn user_display_name<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
The credential’s user.displayName property. Equivalent to empty if not set. https://w3c.github.io/webauthn/#dom-publickeycredentialuserentity-displayname
Sourcepub fn build(&self) -> Result<Credential, CredentialBuilderError>
pub fn build(&self) -> Result<Credential, CredentialBuilderError>
Trait Implementations§
Source§impl Clone for CredentialBuilder
impl Clone for CredentialBuilder
Source§fn clone(&self) -> CredentialBuilder
fn clone(&self) -> CredentialBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more