Table of Contents

Class Credential

Namespace
OpenQA.Selenium.VirtualAuth
Assembly
WebDriver.dll

A credential stored in a virtual authenticator. Refer https://w3c.github.io/webauthn/#credential-parameters

public sealed class Credential
Inheritance
Credential
Inherited Members

Properties

Id

Gets the byte array of the ID of the credential.

public byte[] Id { get; }

Property Value

byte[]

IsResidentCredential

Gets a value indicating whether this Credential is a resident credential.

public bool IsResidentCredential { get; }

Property Value

bool

PrivateKey

Gets the private key of the credential.

public string PrivateKey { get; }

Property Value

string

RpId

Gets the ID of the relying party of this credential.

public string RpId { get; }

Property Value

string

SignCount

Gets the signature counter associated to the public key credential source.

public int SignCount { get; }

Property Value

int

UserHandle

Gets the user handle of the credential.

public byte[]? UserHandle { get; }

Property Value

byte[]

Methods

CreateNonResidentCredential(byte[], string, string, int)

Creates a credential for use with a virtual authenticator.

public static Credential CreateNonResidentCredential(byte[] id, string rpId, string privateKey, int signCount)

Parameters

id byte[]

A byte array representing the ID of the credentials.

rpId string

The ID of the relying party to which the credential is scoped.

privateKey string

The private Key for the credentials.

signCount int

The signature counter for the credentials.

Returns

Credential

The created instance of the Credential class.

Exceptions

ArgumentNullException

If id, rpId, or privateKey are null.

CreateResidentCredential(byte[], string, string, byte[], int)

Creates a credential for use with a virtual authenticator.

public static Credential CreateResidentCredential(byte[] id, string rpId, string privateKey, byte[] userHandle, int signCount)

Parameters

id byte[]

A byte array representing the ID of the credentials.

rpId string

The ID of the relying party to which the credential is scoped.

privateKey string

The private Key for the credentials.

userHandle byte[]

The user handle associated to the credential.

signCount int

The signature counter for the credentials.

Returns

Credential

The created instance of the Credential class.

Exceptions

ArgumentNullException

If id, rpId, or privateKey are null.

FromDictionary(Dictionary<string, object>)

Creates a Credential instance from a dictionary of values.

public static Credential FromDictionary(Dictionary<string, object> dictionary)

Parameters

dictionary Dictionary<string, object>

The dictionary of values to use to create the Credential instance.

Returns

Credential

The created instance of the Credential.

ToDictionary()

Serializes this Credential instance to a dictionary.

public Dictionary<string, object> ToDictionary()

Returns

Dictionary<string, object>

The dictionary containing the values for this Credential.