mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 18:22:39 +03:00
update DeviceInfo
This commit is contained in:
parent
9a3659a423
commit
ccf0c16584
@ -49,8 +49,10 @@ data class Info(
|
||||
val isNfc: Boolean,
|
||||
@SerialName("usb_pid")
|
||||
val usbPid: Int?,
|
||||
@SerialName("pin_complexity")
|
||||
val pinComplexity: Boolean,
|
||||
@SerialName("supported_capabilities")
|
||||
val supportedCapabilities: Capabilities
|
||||
val supportedCapabilities: Capabilities,
|
||||
) {
|
||||
constructor(name: String, isNfc: Boolean, usbPid: Int?, deviceInfo: DeviceInfo) : this(
|
||||
config = Config(deviceInfo.config),
|
||||
@ -63,6 +65,7 @@ data class Info(
|
||||
name = name,
|
||||
isNfc = isNfc,
|
||||
usbPid = usbPid,
|
||||
pinComplexity = deviceInfo.pinComplexity,
|
||||
supportedCapabilities = Capabilities(
|
||||
nfc = deviceInfo.capabilitiesFor(Transport.NFC),
|
||||
usb = deviceInfo.capabilitiesFor(Transport.USB),
|
||||
|
@ -18,5 +18,6 @@ val UnknownDevice = Info(
|
||||
name = "Unrecognized device",
|
||||
isNfc = false,
|
||||
usbPid = null,
|
||||
pinComplexity = false,
|
||||
supportedCapabilities = Capabilities()
|
||||
)
|
@ -74,6 +74,7 @@ class SkyHelper(private val compatUtil: CompatUtil) {
|
||||
name = (device.usbDevice.productName ?: "Yubico Security Key"),
|
||||
isNfc = false,
|
||||
usbPid = pid.value,
|
||||
pinComplexity = false,
|
||||
supportedCapabilities = Capabilities(usb = 0)
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user