From ccf0c165843b06d82da198cbd54240873c57dbb1 Mon Sep 17 00:00:00 2001 From: Adam Velebil Date: Tue, 26 Mar 2024 15:27:10 +0100 Subject: [PATCH] update DeviceInfo --- .../src/main/kotlin/com/yubico/authenticator/device/Info.kt | 5 ++++- .../kotlin/com/yubico/authenticator/device/UnknownDevice.kt | 1 + .../kotlin/com/yubico/authenticator/yubikit/SkyHelper.kt | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/kotlin/com/yubico/authenticator/device/Info.kt b/android/app/src/main/kotlin/com/yubico/authenticator/device/Info.kt index e27e4add..c8f93683 100644 --- a/android/app/src/main/kotlin/com/yubico/authenticator/device/Info.kt +++ b/android/app/src/main/kotlin/com/yubico/authenticator/device/Info.kt @@ -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), diff --git a/android/app/src/main/kotlin/com/yubico/authenticator/device/UnknownDevice.kt b/android/app/src/main/kotlin/com/yubico/authenticator/device/UnknownDevice.kt index f457bf31..6fc29f9c 100644 --- a/android/app/src/main/kotlin/com/yubico/authenticator/device/UnknownDevice.kt +++ b/android/app/src/main/kotlin/com/yubico/authenticator/device/UnknownDevice.kt @@ -18,5 +18,6 @@ val UnknownDevice = Info( name = "Unrecognized device", isNfc = false, usbPid = null, + pinComplexity = false, supportedCapabilities = Capabilities() ) \ No newline at end of file diff --git a/android/app/src/main/kotlin/com/yubico/authenticator/yubikit/SkyHelper.kt b/android/app/src/main/kotlin/com/yubico/authenticator/yubikit/SkyHelper.kt index ec760fd1..05458eb5 100644 --- a/android/app/src/main/kotlin/com/yubico/authenticator/yubikit/SkyHelper.kt +++ b/android/app/src/main/kotlin/com/yubico/authenticator/yubikit/SkyHelper.kt @@ -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) ) }