Show / Hide Table of Contents

SetPinCommand Class

Namespace: Yubico.YubiKey.Fido2.Commands Assembly: Yubico.YubiKey.dll

Set the YubiKey's FIDO2 application to be PIN-protected.

C#
public class SetPinCommand : IYubiKeyCommand<SetPinResponse>
Inheritance object SetPinCommand
Implements
IYubiKeyCommand<SetPinResponse>

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.

In this article
Back to top Generated by DocFX