CredentialsResponse
Namespace: Wisej.Ext.WebAuthn
Assembly: Wisej.Ext.WebAuthn (4.1.0.0)
Represents the result of a request for credentials from the client.
- C#
- VB.NET
public class CredentialsResponse
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
CredentialsResponse()
Initializes a new instance of CredentialsResponse.
Properties
AuthenticatorData
AuthenticatorData: The authenticator data provided by the client.
See #authenticator-data.
ClientData
ClientData: The client data provided by the client.
See: #dictdef-collectedclientdata.
Signature
Byte[]: Represents an assertion by the authenticator that the user has consented to a specific transaction.
See: #webauthn-signature.
SignatureCounter
Int32: The number of successful calls to authenticatorGetAssertion(). Used for detecting cloned authenticators.
See: #signature-counter.
UserHandle
String: The user handle associated when this public key credential source was created.