Fido2Session Constructor
Fido2Session(IYubiKeyDevice)
Creates an instance of Fido2Session, the object that represents the FIDO2 application on the YubiKey.
C#
public Fido2Session(IYubiKeyDevice yubiKeyDevice)
Parameters
Type | Name | Description |
---|---|---|
IYubiKeyDevice | yubiKeyDevice | The object that represents the actual YubiKey on which the FIDO2 operations should be performed. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The |
Remarks
Because this class implements IDisposable
, use the using
keyword. For example,
IYubiKeyDevice yubiKeyToUse = SelectYubiKey();
using (var fido2 = new Fido2Session(yubiKeyToUse))
{
/* Perform FIDO2 operations. */
}