AddCredentialCommand Class
Namespace: Yubico.YubiKey.YubiHsmAuth.Commands Assembly: Yubico.YubiKey.dllThe command class for adding a credential to the YubiHSM Auth application.
public sealed class AddCredentialCommand : Object, IYubiKeyCommand<AddCredentialResponse>
Implements
Remarks
The partner class is AddCredentialResponse. See CredentialWithSecrets for further information on the requirements of the new credential.
There is a limit of 8 attempts to authenticate with the management key before the management key is blocked. Once the management key is blocked, the application must be reset before performing operations which require authentication with the management key (such as adding credentials, deleting credentials, and changing the management key). To reset the application, see ResetApplicationCommand. Supplying the correct management key before the management key is blocked will reset the retry counter to 8.
Constructors
Name | Description |
---|---|
AddCredentialCommand(ReadOnlyMemory<Byte>, CredentialWithSecrets) | Add a credential to the YubiHSM Auth application. |
Fields
Name | Description |
---|---|
ValidManagementKeyLength | The management key must be exactly 16 bytes. |
Properties
Name | Description |
---|---|
Application | Gets the YubiKeyApplication (e.g. PIV, OATH, etc.) to which this command applies. |
Methods
Name | Description |
---|---|
CreateCommandApdu() | Creates a well-formed CommandApdu to send to the YubiKey. |
CreateResponseForApdu(ResponseApdu) | Creates the corresponding IYubiKeyResponse implementation for the current command. |