pub struct WebAuthnSignature {
pub credential_id: String,
pub authenticator_data: String,
pub client_data_json: String,
pub signature: String,
}Available on crate feature
signatures only.Expand description
WebAuthn/FIDO2 signature data.
Contains the assertion response from a WebAuthn authenticator. All fields are base64-encoded as per the Codex specification.
§Verification
To verify a WebAuthn signature:
- Decode all base64 fields
- Parse
client_data_jsonand verify the challenge matches the document ID - Verify the authenticator data flags and counter
- Verify the signature over authenticator data + SHA-256(client data JSON)
Fields§
§credential_id: StringBase64-encoded credential ID.
Identifies the credential used for signing.
authenticator_data: StringBase64-encoded authenticator data.
Contains the RP ID hash, flags, and signature counter.
client_data_json: StringBase64-encoded client data JSON.
Contains the challenge (document ID), origin, and type.
signature: StringBase64-encoded signature.
The cryptographic signature over the authenticator data concatenated with the SHA-256 hash of the client data JSON.
Implementations§
Trait Implementations§
Source§impl Clone for WebAuthnSignature
impl Clone for WebAuthnSignature
Source§fn clone(&self) -> WebAuthnSignature
fn clone(&self) -> WebAuthnSignature
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WebAuthnSignature
impl Debug for WebAuthnSignature
Source§impl<'de> Deserialize<'de> for WebAuthnSignature
impl<'de> Deserialize<'de> for WebAuthnSignature
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for WebAuthnSignature
impl PartialEq for WebAuthnSignature
Source§impl Serialize for WebAuthnSignature
impl Serialize for WebAuthnSignature
impl Eq for WebAuthnSignature
impl StructuralPartialEq for WebAuthnSignature
Auto Trait Implementations§
impl Freeze for WebAuthnSignature
impl RefUnwindSafe for WebAuthnSignature
impl Send for WebAuthnSignature
impl Sync for WebAuthnSignature
impl Unpin for WebAuthnSignature
impl UnsafeUnpin for WebAuthnSignature
impl UnwindSafe for WebAuthnSignature
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.