pub struct PublicKeyCredentialUserEntity {
    pub id: Bytes,
    pub display_name: String,
    pub name: String,
}
Expand description

This type is used to supply additional user account attributes when creating a new credential.

The name and display_name members should follow the following guidelines:

  • Relying Parties SHOULD perform enforcement, as prescribed in Section 2.3 of RFC8266 for the Nickname Profile of the PRECIS FreeformClass RFC8264, when setting name’s value, or displaying the value to the user.
  • This string MAY contain language and direction metadata. Relying Parties SHOULD consider providing this information. See Language and Direction Encoding about how this metadata is encoded.
  • Clients SHOULD perform enforcement, as prescribed in Section 2.3 of RFC8266 for the Nickname Profile of the PRECIS FreeformClass RFC8264, on name’s value prior to displaying the value to the user or including the value as a parameter of the authenticatorMakeCredential operation.

https://w3c.github.io/webauthn/#dictdef-publickeycredentialuserentity

Fields§

§id: Bytes

The user handle of the user account. A user handle is an opaque byte sequence with a maximum size of 64 bytes, and is not meant to be displayed to the user.

To ensure secure operation, authentication and authorization decisions MUST be made on the basis of this id member, not the Self::display_name nor Self::name members.

The user handle MUST NOT contain personally identifying information about the user, such as a username or e-mail address; see User Handle Contents for details. The user handle MUST NOT be empty.

§display_name: String

A human-palatable name for the user account, intended only for display. For example:

  • “Alex Müller” or
  • “田中倫”.

The Relying Party SHOULD let the user choose this, and SHOULD NOT restrict the choice more than necessary.

Authenticators MUST accept and store a 64-byte minimum length for a display_name member’s value. Authenticators MAY truncate a displayName member’s value so that it fits within 64 bytes. See String Truncation about truncation and other considerations.

§name: String

A human-palatable identifier for a user account. It is intended only for display, i.e., aiding the user in determining the difference between user accounts with similar Self::display_names. For example:

  • “alexm”,
  • “alex.mueller@example.com” or
  • “+14255551234”

Authenticators MUST accept and store a 64-byte minimum length for a display_name member’s value. Authenticators MAY truncate a displayName member’s value so that it fits within 64 bytes. See String Truncation about truncation and other considerations.

Trait Implementations§

source§

impl Clone for PublicKeyCredentialUserEntity

source§

fn clone(&self) -> PublicKeyCredentialUserEntity

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PublicKeyCredentialUserEntity

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PublicKeyCredentialUserEntity

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<PublicKeyCredentialUserEntity> for PublicKeyCredentialUserEntity

source§

fn from(value: PublicKeyCredentialUserEntity) -> Self

Converts to this type from the input type.
source§

impl Serialize for PublicKeyCredentialUserEntity

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<PublicKeyCredentialUserEntity> for PublicKeyCredentialUserEntity

§

type Error = &'static str

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

fn try_from(value: PublicKeyCredentialUserEntity) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

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

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.
§

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

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,