Table of Contents

Class VerifyUvCommand

Namespace
Yubico.YubiKey.Piv.Commands
Assembly
Yubico.YubiKey.dll

Authenticate with YubiKey Bio multi-protocol capabilities.

public sealed class VerifyUvCommand : IYubiKeyCommand<VerifyUvResponse>
Inheritance
object
VerifyUvCommand
Implements

Remarks

The partner Response class is VerifyUvResponse.

Before calling this method, clients must verify that the authenticator is bio-capable and not blocked for biometric matching.

Constructors

VerifyUvCommand()

Initializes a new instance of the VerifyUvCommand class.

public VerifyUvCommand()

Remarks

This constructor is provided for those developers who want to use the object initializer pattern. For example:

var command = new VerifyUvCommand()
{
    CheckOnly = true;
};

VerifyUvCommand(bool, bool)

Initializes a new instance of the VerifyUvCommand class.

public VerifyUvCommand(bool requestTemporaryPin, bool checkOnly)

Parameters

requestTemporaryPin bool

After successful match generate a temporary PIN. Certain conditions may lead to the clearing of the temporary PIN, such as fingerprint mismatch, PIV PIN failed verification, timeout, power loss, failed attempt to verify against the set value.

checkOnly bool

Check verification state of biometrics, don't perform UV.

Exceptions

ArgumentException

The PIN is an invalid length or requestTemporaryPin and checkOnly are both set to true.

Properties

Application

Gets the YubiKeyApplication to which this command belongs. For this command it's PIV.

public YubiKeyApplication Application { get; }

Property Value

YubiKeyApplication

YubiKeyApplication.Piv

CheckOnly

public bool CheckOnly { get; set; }

Property Value

bool

RequestTemporaryPin

public bool RequestTemporaryPin { get; set; }

Property Value

bool

Methods

CreateCommandApdu()

Creates a well-formed CommandApdu to send to the YubiKey.

public CommandApdu CreateCommandApdu()

Returns

CommandApdu

A valid CommandApdu that is ready to be sent to the YubiKey, or passed along to additional encoders for further processing.

Remarks

This method will first perform validation on all of the parameters and data provided to it. The CommandAPDU it creates should contain all of the data payload for the command, even if it exceeds 65,535 bytes as specified by the ISO 7816-4 specification. The APDU will be properly chained by the device connection prior to being sent to the YubiKey, and the responses will collapsed into a single result.

CreateResponseForApdu(ResponseApdu)

Creates the corresponding IYubiKeyResponse implementation for the current command.

public VerifyUvResponse CreateResponseForApdu(ResponseApdu responseApdu)

Parameters

responseApdu ResponseApdu

The ResponseApdu returned by the YubiKey.

Returns

VerifyUvResponse

The implementation of IYubiKeyResponse that parses and presents ths response APDU.