VerifyUvResponse Class
Namespace: Yubico.YubiKey.Piv.Commands Assembly: Yubico.YubiKey.dllThe response to biometric verification.
C#
public sealed class VerifyUvResponse : PivResponse, 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.
Status | Description |
---|---|
Success | The biometric authentication succeeded. GetData returns the temporary pin if requested. |
AuthenticationRequired | The 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, Boolean) | 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 |
Methods
Name | Description |
---|---|
GetData() | Gets the temporary PIN if requested. |