U2fSession Constructor
U2fSession(IYubiKeyDevice)
Creates an instance of U2fSession, the object that represents the FIDO U2F application on the YubiKey.
C#
public U2fSession(IYubiKeyDevice yubiKey)
Parameters
Type | Name | Description |
---|---|---|
IYubiKeyDevice | yubiKey | The object that represents the actual YubiKey on which the U2F 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 u2f = new U2fSession(yubiKeyToUse))
{
/* Perform U2F operations. */
}