Show / Hide Table of Contents

VerifyTemporaryPinResponse Class

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

The response to verifying the temporary PIN.

C#
public sealed class VerifyTemporaryPinResponse : PivResponse, IYubiKeyResponse
Inheritance object YubiKeyResponse PivResponse VerifyTemporaryPinResponse
Implements
IYubiKeyResponse

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

Name Description
VerifyTemporaryPinResponse(ResponseApdu)

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

In this article
Back to top Generated by DocFX