Show / Hide Table of Contents

AuthenticateCommand Constructor

AuthenticateCommand()

Creates an instance of the command.

C#
public AuthenticateCommand()

Remarks

This constructor is provided for those developers who want to use the object initializer pattern.

Set the ClientDataHash, ApplicationId, KeyHandle and ControlByte properties before sending the command to the YubiKey.

AuthenticateCommand(U2fAuthenticationType, ReadOnlyMemory<byte>, ReadOnlyMemory<byte>, ReadOnlyMemory<byte>)

Creates an instance of the command with the given auth type, client data hash, app ID, and key handle.

C#
public AuthenticateCommand(U2fAuthenticationType controlByte, ReadOnlyMemory<byte> applicationId, ReadOnlyMemory<byte> clientDataHash, ReadOnlyMemory<byte> keyHandle)

Parameters

Type Name Description
U2fAuthenticationType controlByte

The type of authentication to perform.

ReadOnlyMemory<byte> applicationId

The SHA256 hash of the Relying Party ID. It must be 32 bytes long. This is the hash of the origin data.

ReadOnlyMemory<byte> clientDataHash

The clientDataHash or "challenge" in the U2F (or CTAP2) specifications. It must be 32 bytes long.

ReadOnlyMemory<byte> keyHandle

The key handle provided by the Relying Party.

Remarks

The controlByte indicates what level of authentication to perform. It is called "control byte" because the standard specifies a control byte in the command's encoding.

The applicationId and clientDataHash are values provided by the client.

The keyHandle is the value provided by the relying party, it was created by the YubiKey during registration and stored by the relying party.

In this article
Back to top Generated by DocFX