Class VerifyTemporaryPinResponse
The response to verifying the temporary PIN.
public sealed class VerifyTemporaryPinResponse : PivResponse, IYubiKeyResponse
- Inheritance
-
objectVerifyTemporaryPinResponse
- Implements
- Inherited Members
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
VerifyTemporaryPinResponse(ResponseApdu)
Constructs a VerifyTemporaryPinResponse based on a ResponseApdu received from the YubiKey.
public VerifyTemporaryPinResponse(ResponseApdu responseApdu)
Parameters
responseApdu
ResponseApduThe object containing the response APDU
returned by the YubiKey.