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
PrivateKey
Gets the private key of the credential.
public string PrivateKey { get; }
Property Value
RpId
Gets the ID of the relying party of this credential.
public string RpId { get; }
Property Value
SignCount
Gets the signature counter associated to the public key credential source.
public int SignCount { get; }
Property Value
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
stringThe ID of the relying party to which the credential is scoped.
privateKey
stringThe private Key for the credentials.
signCount
intThe signature counter for the credentials.
Returns
- Credential
The created instance of the Credential class.
Exceptions
- ArgumentNullException
If
id
,rpId
, orprivateKey
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
stringThe ID of the relying party to which the credential is scoped.
privateKey
stringThe private Key for the credentials.
userHandle
byte[]The user handle associated to the credential.
signCount
intThe signature counter for the credentials.
Returns
- Credential
The created instance of the Credential class.
Exceptions
- ArgumentNullException
If
id
,rpId
, orprivateKey
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.