Show / Hide Table of Contents

GetPinUvAuthTokenUsingUvCommand Constructor

GetPinUvAuthTokenUsingUvCommand(PinUvAuthProtocolBase, PinUvAuthTokenPermissions, string?)

Constructs a new instance of GetPinUvAuthTokenUsingUvCommand.

C#
public GetPinUvAuthTokenUsingUvCommand(PinUvAuthProtocolBase pinProtocol, PinUvAuthTokenPermissions permissions, string? rpId)

Parameters

Type Name Description
PinUvAuthProtocolBase pinProtocol

An object defining the PIN protocol the command will use. The Encapsulate(CoseKey) method must have been successfully executed before passing it to this constructor.

PinUvAuthTokenPermissions permissions

All the permissions necessary to complete the operations intended.

string rpId

If at least one of the permissions chosen requires it or is optional and the feature is intended, supply it here. Otherwise, pass in null.

Exceptions

Type Condition
ArgumentNullException

The pinProtocol arg is null.

InvalidOperationException

The pinProtocol is in a state indicating Encapsulate has not executed.

Remarks

The subcommand in the standard is called getPinUvAuthTokenUsingUvWithPermissions. The UsingUv means the authentication is built into the YubiKey, such as the YubiKey Bio series (fingerprint). Note that PIN verification is available on all YubiKeys that support FIDO2, including the YubiKey Bio Series. WithPermissions means the token will be associated with permissions. The caller must specify the permissions as a bit field, the PinUvAuthTokenPermissions enum. Note that with some permissions, the relying party ID (rpId) is required as well. For other permissions it is optional or ignored, so the rpId arg can be null.

The caller must specify which PIN protocol the command will use. This is done by passing in a subclass of PinUvAuthProtocolBase. This constructor requires the Encapsulate(CoseKey) method to have been called before passing it in. Note that the Encapsulate method requires the YubiKey's public key, which is obtained by executing the GetKeyAgreementCommand.

In this article
Back to top Generated by DocFX