Table of Contents

Class GetCredentialMetadataCommand

Namespace
Yubico.YubiKey.Fido2.Commands
Assembly
Yubico.YubiKey.dll

Get the YubiKey's FIDO2 credential metadata.

public class GetCredentialMetadataCommand : CredentialMgmtSubCommand, IYubiKeyCommand<GetCredentialMetadataResponse>
Inheritance
object
GetCredentialMetadataCommand
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

pinUvAuthParam ReadOnlyMemory<byte>

The pre-computed PIN/UV auth param for this command.

protocol PinUvAuthProtocol

The 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

pinUvAuthToken ReadOnlyMemory<byte>

The PIN/UV Auth Token built from the PIN. This is the encrypted token key.

authProtocol PinUvAuthProtocolBase

The 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

responseApdu ResponseApdu

The 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.