ClientData
Namespace: Wisej.Ext.WebAuthn
Assembly: Wisej.Ext.WebAuthn (4.1.0.0)
The client data represents the contextual bindings of both the WebAuthn Relying Party and the client.
- C#
- VB.NET
public class ClientData
Public Class ClientData
Returned in ClientData. Base64 is only set by GetAsync. See #dictionary-client-data.
Example:
CredentialsResponse response = await WebAuthn.GetAsync(challenge, allowCredentials, 60000);
ClientData clientData = response.ClientData;
// Reject responses that were not produced for this operation or origin.
if (clientData.Type != "webauthn.get" || clientData.Origin != "https://example.com")
throw new InvalidOperationException("Unexpected client data.");
Constructors
ClientData()
Initializes a new instance of ClientData.
Properties
Base64
String: The client data in base64 format.
Challenge
Byte[]: The challenge returned from the client.
Origin
String: This member contains the fully qualified origin of the requester, as provided to the authenticator by the client, in the syntax defined by [RFC6454].
Type
String: This member contains the string "webauthn.create" when creating new credentials, and "webauthn.get" when getting an assertion from an existing credential.
The purpose of this member is to prevent certain types of signature confusion attacks (where an attacker substitutes one legitimate signature for another).