Remove special case for U2F security key

This commit is contained in:
Emil Lundberg 2018-02-14 15:51:36 +01:00
parent e08d1f6dda
commit a137b5ab9f
No known key found for this signature in database
GPG Key ID: 5B9688125FF0B636
2 changed files with 4 additions and 18 deletions

View File

@ -20,21 +20,10 @@ Label {
if (device.nDevices === 0) {
return qsTr("No YubiKey detected.")
} else if (device.nDevices === 1) {
if (device.unusableDeviceDescription) {
switch (device.unusableDeviceDescription.pid) {
case 288:
// FIDO U2F Security Key by Yubico
return qsTr("The connected device is a %1. This device cannot be used with Yubico Authenticator.").arg(
device.unusableDeviceDescription.type)
default:
if (settings.slotMode && !device.hasOTP) {
return qsTr("Authenticator mode is set to YubiKey slots, but the OTP connection mode is not enabled.")
} else if (ccidMode && !device.hasCCID) {
return qsTr("Authenticator mode is set to CCID, but the CCID connection mode is not enabled.")
} else {
return qsTr("The connected device cannot be used with Yubico Authenticator.")
}
}
if (settings.slotMode && !device.hasOTP) {
return qsTr("Authenticator mode is set to YubiKey slots, but the OTP connection mode is not enabled.")
} else if (ccidMode && !device.hasCCID) {
return qsTr("Authenticator mode is set to CCID, but the CCID connection mode is not enabled.")
} else {
return qsTr("Connecting to YubiKey...")
}

View File

@ -9,7 +9,6 @@ Python {
property int nDevices
property bool hasDevice
property var unusableDeviceDescription
property string name
property var version
property string oathId
@ -108,14 +107,12 @@ Python {
enabled = usable ? dev.enabled : []
connections = usable ? dev.connections : (dev ? dev.transports : [])
hasDevice = !!usable
unusableDeviceDescription = usable ? null : dev
})
} else {
// No longer has device
hasDevice = false
entries = null
nextRefresh = 0
unusableDeviceDescription = null
}
refreshCredentialsOnMode()
})