PublicKeyCredential

Struct PublicKeyCredential 

Source
pub struct PublicKeyCredential<R: AuthenticatorResponse> {
    pub id: String,
    pub raw_id: Bytes,
    pub ty: PublicKeyCredentialType,
    pub response: R,
    pub authenticator_attachment: Option<AuthenticatorAttachment>,
    pub client_extension_results: AuthenticationExtensionsClientOutputs,
}
Expand description

This is the response from a successful creation or assertion of a credential.

It is recommended to use the type aliases depending on which response you are expecting:

https://w3c.github.io/webauthn/#iface-pkcredential

Fields§

§id: String

The id contains the credential ID, chosen by the authenticator. This is usually the base64url encoded data of Self::raw_id

The credential ID is used to look up credentials for use and is therefore expected to be globally unique with high probability across all credentials of the same type across all authenticators.

NOTE: This API does not constrain the format or length of this identifier, except that it MUST be sufficient for the authenticator to uniquely select a key.

§raw_id: Bytes

The raw byte containing the credential ID, see Self::id for more information.

§ty: PublicKeyCredentialType§response: R

This contains the authenticator’s response to the client’s request to either:

§authenticator_attachment: Option<AuthenticatorAttachment>

This reports the modality of the communication between the client and authenticator.

§client_extension_results: AuthenticationExtensionsClientOutputs

This object is a map containing extension identifier → client extension output entries produced by the extension’s client extension processing.

Trait Implementations§

Source§

impl<R: Debug + AuthenticatorResponse> Debug for PublicKeyCredential<R>

Source§

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

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

impl<'de, R> Deserialize<'de> for PublicKeyCredential<R>

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<R> Serialize for PublicKeyCredential<R>

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

Auto Trait Implementations§

§

impl<R> Freeze for PublicKeyCredential<R>
where R: Freeze,

§

impl<R> RefUnwindSafe for PublicKeyCredential<R>
where R: RefUnwindSafe,

§

impl<R> Send for PublicKeyCredential<R>
where R: Send,

§

impl<R> Sync for PublicKeyCredential<R>
where R: Sync,

§

impl<R> Unpin for PublicKeyCredential<R>
where R: Unpin,

§

impl<R> UnwindSafe for PublicKeyCredential<R>
where R: UnwindSafe,

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

Source§

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