VerifyTemporaryPinResponse Class
Namespace: Yubico.YubiKey.Piv.Commands Assembly: Yubico.YubiKey.dllThe response to verifying the temporary PIN.
C#
public sealed class VerifyTemporaryPinResponse : PivResponse, IYubiKeyResponse
Implements
Remarks
This is the partner Response class to VerifyTemporaryPinCommand.
Status | Description |
---|---|
Success | The temporary PIN was valid and verified successfully. GetData returns null . |
AuthenticationRequired | The 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. |