Show / Hide Table of Contents

KeyCollector Property

KeyCollector

A callback that this class will call when it needs the YubiKey touched or a PIN verified.

C#
public Func<KeyEntryData, bool>? KeyCollector { get; set; }

Property Value

Type Description
Func<KeyEntryData, bool>

Remarks

With a FIDO2 Session, there are three situations where the SDK will call a KeyCollector: PIN, non-biometric touch, and biometric touch. Biometric touch is only available on YubiKey Bio Series keys.

It is possible to perform PIN operations without using the KeyCollector. Look for the overloads of TryVerifyPin, TryChangePin, and TrySetPin that take in PIN parameters. With Touch, the KeyCollector will call your application when the YubiKey is waiting for proof of user presence. This is so that your application can alert the user that touch is required. There is nothing the KeyCollector needs to return to the SDK.

If you do not provide a KeyCollector and an operation requires touch, then the SDK will simply wait for the touch without informing the caller. However, it will be much more difficult to know when touch is needed. The end user will have to know that touch is needed and look for the flashing YubiKey.

You can read more about the KeyCollector and its implementation in its user's manual entry.

In this article
Back to top Generated by DocFX