Class GetCredentialMetadataCommand
Get the YubiKey's FIDO2 credential metadata.
public class GetCredentialMetadataCommand : CredentialMgmtSubCommand, IYubiKeyCommand<GetCredentialMetadataResponse>
- Inheritance
-
objectGetCredentialMetadataCommand
- Implements
- Inherited Members
Remarks
The partner Response class is CredentialManagementResponse.
This returns metadata on all the credentials. The return from this
command consists of the existingResidentCredentialsCount and
maxPossibleRemainingResidentCredentialsCount (section 6.8 of the
standard).
Constructors
GetCredentialMetadataCommand(ReadOnlyMemory<byte>, PinUvAuthProtocol)
Constructs a new instance of GetCredentialMetadataCommand with a pre-computed PIN/UV auth param.
public GetCredentialMetadataCommand(ReadOnlyMemory<byte> pinUvAuthParam, PinUvAuthProtocol protocol)
Parameters
pinUvAuthParamReadOnlyMemory<byte>The pre-computed PIN/UV auth param for this command.
protocolPinUvAuthProtocolThe PIN/UV protocol version used to compute the auth param.
GetCredentialMetadataCommand(ReadOnlyMemory<byte>, PinUvAuthProtocolBase)
Constructs a new instance of GetCredentialMetadataCommand.
public GetCredentialMetadataCommand(ReadOnlyMemory<byte> pinUvAuthToken, PinUvAuthProtocolBase authProtocol)
Parameters
pinUvAuthTokenReadOnlyMemory<byte>The PIN/UV Auth Token built from the PIN. This is the encrypted token key.
authProtocolPinUvAuthProtocolBaseThe Auth Protocol used to build the Auth Token.
Methods
CreateResponseForApdu(ResponseApdu)
Creates the corresponding IYubiKeyResponse implementation for the current command.
public GetCredentialMetadataResponse CreateResponseForApdu(ResponseApdu responseApdu)
Parameters
responseApduResponseApduThe ResponseApdu returned by the YubiKey.
Returns
- GetCredentialMetadataResponse
The implementation of IYubiKeyResponse that parses and presents ths response APDU.
GetAuthenticationMessage()
Creates the authentication message for this command, consisting of only the subcommand byte.
public static byte[] GetAuthenticationMessage()
Returns
- byte[]
The message to be used for PIN/UV authentication.