AuthenticateManagementKey Method
AuthenticateManagementKey(bool)
Authenticate the management key, throw an exception if the user cancels.
C#
public void AuthenticateManagementKey(bool mutualAuthentication = true)
Parameters
Type | Name | Description |
---|---|---|
bool | mutualAuthentication |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | There is no |
MalformedYubiKeyResponseException | The YubiKey returned malformed data and authentication, either single or double, could not be performed. |
OperationCanceledException | The user canceled management key collection. |
SecurityException | Mutual authentication was performed and the YubiKey was not authenticated. |
Remarks
This is the same as TryAuthenticateManagementKey
, except this
method will throw an exception if the KeyCollected
indicates
user cancellation.
See the TryAuthenticateManagementKey(bool) method for further documentation on this method.