Show / Hide Table of Contents

VerifyUvResponse Class

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

The response to biometric verification.

C#
public sealed class VerifyUvResponse : PivResponse, IYubiKeyResponseWithData<ReadOnlyMemory<byte>>, IYubiKeyResponse
Inheritance object YubiKeyResponse PivResponse VerifyUvResponse
Implements
IYubiKeyResponseWithData<ReadOnlyMemory<byte>>
IYubiKeyResponse

Remarks

This is the partner Response class to VerifyUvCommand.

To determine the result of the command, first look at the Status. If Status is not one of the following values then an error has occurred and GetData() will throw an exception.

StatusDescription
SuccessThe biometric authentication succeeded. GetData returns the temporary pin if requested.
AuthenticationRequiredThe biometric authentication failed. GetData returns null. AttemptsRemaining returns the number of retries remaining. If the number of retries is 0, the biometric authentication is blocked and the client should authenticate with the PIV PIN via VerifyPinCommand.

Example:

IYubiKeyConnection connection = key.Connect(YubiKeyApplication.Piv);
var command = new VerifyUvCommand(false, false);
VerifyUvResponse response = connection.SendCommand(command);
if (response.Status == ResponseStatus.AuthenticationRequired)
{
  int retryCount = response.AttemptsRemaining;
  /* report the retry count */
}
else if (response.Status != ResponseStatus.Success)
{
  /* handle error */
}

Constructors

Name Description
VerifyUvResponse(ResponseApdu, bool)

Constructs a VerifyUvResponse based on a ResponseApdu received from the YubiKey.

Properties

Name Description
AttemptsRemaining

Indicates how many biometric match retries are left (biometric match retry counter) until a biometric verification is blocked.

StatusCodeMap

Retrieves the details describing the processing state.

Methods

Name Description
GetData()

Gets the temporary PIN if requested.

In this article
Back to top Generated by DocFX