Class SoftwareAuthenticator
A software authenticator that holds one passkey (an ES256 key pair) and answers WebAuthn ceremonies as a browser would: it takes the options JSON of a
ceremony and returns the credential JSON (the PublicKeyCredential.toJSON() form) with a none attestation.
Implements
Namespace: Singulink.Net.Http.Api.Service.Testing
Assembly: Singulink.Net.Http.Api.Service.Testing.dll
Syntax
public sealed class SoftwareAuthenticator : IDisposable
Remarks
The passkey is created by Create(string), which takes the user handle from the creation options, and used by Get(string, bool). The authenticator signs for the relying party ID in the options unless RelyingPartyId is set, and reports Origin as the origin of the page in the client data.
Constructors
| Name | Description |
|---|---|
| SoftwareAuthenticator(string) | Initializes a new instance of the SoftwareAuthenticator class. |
Properties
| Name | Description |
|---|---|
| AaGuid | Gets the AAGUID of the authenticator model that the new passkey reports. Default is Empty. |
| Attachment | Gets the attachment that the credentials report as the browser would. Unknown leaves it out. Default is Platform. |
| CountsSignatures | Gets a value indicating whether the signature counter is incremented before each use of the passkey. Default is false, which many synced passkeys also do. |
| CredentialId | Gets the credential ID of the passkey. Default is 16 random bytes. |
| IsBackedUp | Gets or sets a value indicating whether the passkey reports that it is backed up. Default is true. |
| IsBackupEligible | Gets a value indicating whether the passkey reports that it can be backed up. Default is true. |
| Origin | Gets or sets the origin of the page that runs the ceremonies, which the authenticator reports in the client data. |
| RelyingPartyId | Gets or sets the relying party ID the authenticator signs for, or null for the one in the options of each ceremony. Default is null. |
| SignCount | Gets or sets the signature counter that the passkey reports. If CountsSignatures is true, it is incremented before each use of the passkey. Default is 0. |
| Transports | Gets the transports that the new passkey reports. Default is |
| UserHandle | Gets or sets the user handle that the passkey returns when it is used, or null for none. Create(string) sets it to the user ID in the creation options. |
| VerifiesUser | Gets or sets a value indicating whether the authenticator reports that it verified the user. Default is true. |
Methods
| Name | Description |
|---|---|
| Create(string) | Creates the passkey for the specified creation options and returns the credential JSON of a registration ceremony. |
| Dispose() | Releases the passkey's key. |
| Get(string, bool) | Uses the passkey for the specified request options and returns the credential JSON of a sign-in or verification ceremony. |