TsgcWSAPIServer_WebAuthn › Methods › AddCredential
Registers an existing credential in the server credential store so the user can authenticate later.
public void AddCredential(TsgcWebAuthn_CredentialRecord aCredential);
| Name | Type | Description |
|---|---|---|
aCredential | const TsgcWebAuthn_CredentialRecord | Record that holds the user identifier, credential id, public key, sign counter and attestation data returned by the authenticator. |
Use this overload to restore credentials previously persisted by the application (for example from a database) into the in-memory store used by the Relying Party, typically during server startup.
public void AddCredential(string aJSON);
| Name | Type | Description |
|---|---|---|
aJSON | const string | JSON string that describes the credential (user id, credential id, public key, sign counter) as serialized by a previous registration. |
This overload is a convenience when credentials are stored as JSON blobs. The JSON is parsed internally and converted to a TsgcWebAuthn_CredentialRecord before being added to the store.