Show / Hide Table of Contents

KeyCollector Property

KeyCollector

The Delegate this class will call when it needs a PIN, PUK, or management key.

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

Property Value

Type Description
Func<KeyEntryData, bool>

Remarks

The delegate provided will read the KeyEntryData which contains the information needed to determine what to collect and methods to submit what was collected. The delegate will return true for success or false for "cancel". A cancel will usually happen when the user has clicked a "Cancel" button. That is often the case when the user has entered the wrong value a number of times, the remaining tries count is getting low, and they would like to stop trying before the YubiKey is blocked.

Note that the SDK will call the KeyCollector with a Request of Release when the process completes. In this case, the KeyCollector MUST NOT throw an exception. The Release is called from inside a finally block, and it is a bad idea to throw exceptions from inside finally.

In this article
Back to top Generated by DocFX