Table of Contents

Class CredentialMgmtSubCommand

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

A base class for CredentialManagementCommand classes to share code.

public class CredentialMgmtSubCommand
Inheritance
object
CredentialMgmtSubCommand
Derived

Constructors

CredentialMgmtSubCommand()

The default constructor explicitly defined. We don't want it to be used.

protected CredentialMgmtSubCommand()

Exceptions

NotImplementedException

If this constructor is called.

CredentialMgmtSubCommand(CredentialManagementCommand)

Constructs a new instance of CredentialMgmtSubCommand.

protected CredentialMgmtSubCommand(CredentialManagementCommand command)

Parameters

command CredentialManagementCommand

Properties

Application

public YubiKeyApplication Application { get; }

Property Value

YubiKeyApplication

Command

The object that will perform many of the operations. It contains shared code.

protected CredentialManagementCommand Command { get; }

Property Value

CredentialManagementCommand

IsPreview

Indicates whether the Apdu should be built with the CredentialMgmtPreview command or not.

public bool IsPreview { get; set; }

Property Value

bool

Remarks

The authenticatorCredentialManagement command was introduced in FIDO2.1. Hence, YubiKeys that do not support 2.1 will not have this feature. However, there was a version "2_1_PRE" which contained the "CredentialMgmtPreview" command. Each "credMgmt" command has a corresponding operation in this preview command.

If the YubiKey does not support "credMgmt" but does support "CredentialMgmtPreview", then set this boolean to true. Otherwise, do nothing, it will be false by default.

When building the APDU, this class will use the appropriate command byte, based on this property.

Note that a YubiKey that supports only "CredentialMgmtPreview" and "FIDO_2_1_PRE" will not support AuthTokens with permissions. In this case, the input pinUvAuthToken will need to be a PinToken.

Methods

CreateCommandApdu()

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

public CommandApdu CreateCommandApdu()

Returns

CommandApdu