Table of Contents

Class VerifyTemporaryPinResponse

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

The response to verifying the temporary PIN.

public sealed class VerifyTemporaryPinResponse : PivResponse, IYubiKeyResponse
Inheritance
object
VerifyTemporaryPinResponse
Implements
Inherited Members

Remarks

This is the partner Response class to VerifyTemporaryPinCommand.

StatusDescription
SuccessThe temporary PIN was valid and verified successfully. GetData returns null.
AuthenticationRequiredThe temporary PIN was not valid. The temporary PIN is cleared from the YubiKey, and the session is not authenticated.

Example:

/* This example assumes the application has obtained a temporary PIN by calling
 * VerifyUvCommand(true, false).
 */
byte[] temporaryPin = ...;
IYubiKeyConnection connection = key.Connect(YubiKeyApplication.Piv);
var command = new VerifyTemporaryPinCommand(temporaryPin);
VerifyTemporaryPinResponse response = connection.SendCommand(command);
if (response.Status == ResponseStatus.Success)
{
  /* session is authenticated */
}
else 
{
  /* authentication failed, application has to retry */
}

Constructors

VerifyTemporaryPinResponse(ResponseApdu)

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

public VerifyTemporaryPinResponse(ResponseApdu responseApdu)

Parameters

responseApdu ResponseApdu

The object containing the response APDU
returned by the YubiKey.