Class ClientPinResponse
The response partner to ClientPinCommand.
public class ClientPinResponse : Fido2Response, IYubiKeyResponseWithData<ClientPinData>, IYubiKeyResponse
- Inheritance
-
objectClientPinResponse
- Implements
- Inherited Members
Remarks
Like ClientPinCommand, this response represents all of the possible outputs of all subcommands
supported by authenticatorClientPin
. It is recommended that you use the command class that corresponds with
the particular subcommand you care about. Doing so will return a more specific response partner class that will
only contain the information relevant to that subcommand.
Constructors
ClientPinResponse(ResponseApdu)
Constructs a new instance of ClientPinResponse based on a response APDU provided by the YubiKey.
public ClientPinResponse(ResponseApdu responseApdu)
Parameters
responseApdu
ResponseApduA response APDU containing the CBOR response data for the
authenticatorClientPin
command.
Methods
GetData()
Gets the data from the YubiKey response.
public ClientPinData GetData()
Returns
- ClientPinData
The data returned by the YubiKey, presented in a manner specific to each implementation.
Remarks
If the method cannot return the data, it will throw an exception. This happens when the Status property indicates an error, or the data returned from the YubiKey was malformed or incomplete.
For example,
IYubiKeyConnection connection = key.Connect(YubiKeyApplication.Piv);
GetDataCommand getDataCommand = new GetDataCommand(PivDataTag.Chuid);
GetDataResponse getDataResponse = connection.SendCommand(getDataCommand);
if (getDataResponse.Status == ResponseStatus.Success)
{
byte[] getChuid = getDataResponse.GetData();
}