Show / Hide Table of Contents

CredentialManagementCommand Class

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

The CredentialManagementCommand is the class for authenticatorCredentialManagement. This command has a number of subcommands, each of which is represented by its own class. You will likely never use this class directly, but it does contain code shared by all the subcommands.

C#
public class CredentialManagementCommand : IYubiKeyCommand<CredentialManagementResponse>
Inheritance object CredentialManagementCommand
Implements
IYubiKeyCommand<CredentialManagementResponse>

Remarks

The authenticatorCredentialManagement (0x0A) FIDO2 command can be thought of as a "meta" command. That is, it provides the structure and mechanism for performing a number of subcommands. These subcommands are:

- getCredsMetadata (0x01)
- enumerateRPsBegin (0x02)
- enumerateRPsGetNextRP (0x03)
- enumerateCredentialsBegin (0x04)
- enumerateCredentialsGetNextCredential (0x05)
- deleteCredential (0x06)
- updateUserInformation (0x07)

Since the SDK does not have the concept of a subcommand natively, these are all exposed as their own separate commands.

See the user manual entry on Credential Management for a much more in depth guide to working with credentials within FIDO2. For more information on a particular subcommand, see the API reference documentation for that command class.

Some of the subcommands return data (e.g. a credential), others return only a success or failure response code.

Constructors

Name Description
CredentialManagementCommand()

This constructor will throw NotImplementedException. It is the default constructor explicitly defined. We don't want it to be used. It is made protected rather than private because there are subclasses.

CredentialManagementCommand(int)

Constructs a new instance of CredentialManagementCommand.

CredentialManagementCommand(int, byte[]?, ReadOnlyMemory<byte>, PinUvAuthProtocolBase)

Constructs a new instance of CredentialManagementCommand.

Properties

Name Description
Application

Gets the YubiKeyApplication (e.g. PIV, OATH, etc.) to which this command applies.

PinUvAuthParam

The output of calling authenticate on the PIN/UV protocol specific to a particular subcommand.

PinUvAuthProtocol

The PIN/UV protocol version chosen by the platform.

SubCommand

The CredentialManagement subcommand to issue to the YubiKey.

SubCommandParameters

The encoded params for the specified subcommand. If a subcommand has no parameters, this will be null.

Methods

Name Description
CreateCommandApdu()

Creates a well-formed CommandApdu to send to the YubiKey.

CreateCommandApdu(bool)

Creates a well-formed CommandApdu to send to the YubiKey.

CreateResponseForApdu(ResponseApdu)

Creates the corresponding IYubiKeyResponse implementation for the current command.

In this article
Back to top Generated by DocFX