Skip to main content

CredentialsResponse

Namespace: Wisej.Ext.WebAuthn

Assembly: Wisej.Ext.WebAuthn (4.1.0.0)

Represents the result of a request for credentials from the client.

public class CredentialsResponse

Returned by CreateAsync and GetAsync. Signature and UserHandle are only set by GetAsync.

Example:

// Registration: keep the public key.
CredentialsResponse created = await WebAuthn.CreateAsync(
challenge, rp, user, parameters, selection, 60000, AttestationConveyancePreference.None);
PublicKey publicKey = created.AuthenticatorData.PublicKey;

// Login: validate the signature with the stored public key.
CredentialsResponse assertion = await WebAuthn.GetAsync(challenge2, allowCredentials, 60000);
bool valid = WebAuthn.Validate(
publicKey,
assertion.AuthenticatorData.Base64,
assertion.ClientData.Base64,
assertion.Signature);

Constructors​

Instance member CredentialsResponse()​

Initializes a new instance of CredentialsResponse.

Properties​

Instance member AuthenticatorData​

AuthenticatorData: The authenticator data provided by the client.

See #authenticator-data.

Instance member ClientData​

ClientData: The client data provided by the client.

See: #dictdef-collectedclientdata.

Instance member Signature​

Byte[]: Represents an assertion by the authenticator that the user has consented to a specific transaction.

See: #webauthn-signature.

Instance member SignatureCounter​

Int32: The number of successful calls to authenticatorGetAssertion(). Used for detecting cloned authenticators.

See: #signature-counter.

Instance member UserHandle​

String: The user handle associated when this public key credential source was created.

See: #public-key-credential-source-userhandle