SetPinCommand Class
Namespace: Yubico.YubiKey.Fido2.Commands Assembly: Yubico.YubiKey.dllSet the YubiKey's FIDO2 application to be PIN-protected.
public class SetPinCommand : Object, IYubiKeyCommand<SetPinResponse>
Implements
Remarks
Upon manufacture, the YubiKey's FIDO2 application has no PIN set as there is no default PIN defined. Any FIDO2 operation is possible by simply inserting the YubiKey and possibly touching the contact.
However, it is possible to set the application to require a PIN to perform many of the operations. Use this command to set the PIN.
Note that this command is possible only if no PIN is currently set. To change a PIN, use the ChangePinCommand. To remove a PIN, reset the application. Note that resetting the application will mean losing all credentials as well as removing the PIN.
Constructors
Name | Description |
---|---|
SetPinCommand(PinUvAuthProtocolBase, ReadOnlyMemory<Byte>) | Constructs a new instance of SetPinCommand. |
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. |