Class BioEnrollNextSampleResponse
The response partner to the BioEnrollNextSampleCommand.
public class BioEnrollNextSampleResponse : Fido2Response, IYubiKeyResponseWithData<BioEnrollSampleResult>, IYubiKeyResponse
- Inheritance
-
objectBioEnrollNextSampleResponse
- Implements
- Inherited Members
Constructors
BioEnrollNextSampleResponse(ResponseApdu, ReadOnlyMemory<byte>)
Constructs a new instance of BioEnrollNextSampleResponse based on a response APDU provided by the YubiKey, along with the template ID of the fingerprint being enrolled.
public BioEnrollNextSampleResponse(ResponseApdu responseApdu, ReadOnlyMemory<byte> templateId)
Parameters
responseApdu
ResponseApduA response APDU containing the CBOR response data for the
authenticatorCredentialManagement
command.templateId
ReadOnlyMemory<byte>The template ID returned by the BioEnrollBeginCommand.
Properties
StatusCodeMap
Overridden to modify the messages associated with certain status words. The messages match the status words' meanings as described in the FIDO2 specifications.
protected override YubiKeyResponse.ResponseStatusPair StatusCodeMap { get; }
Property Value
Methods
GetData()
Gets the data from the YubiKey response.
public BioEnrollSampleResult GetData()
Returns
- BioEnrollSampleResult
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();
}