Skip to main content

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.

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​

Instance member ClientData()​

Initializes a new instance of ClientData.

Properties​

Instance member Base64​

String: The client data in base64 format.

Instance member Challenge​

Byte[]: The challenge returned from the client.

Instance member 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].

Instance member 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).