mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 10:11:52 +03:00
throw on illegal oath type
This commit is contained in:
parent
0a65ad6a73
commit
153d1fce3a
@ -81,7 +81,8 @@ class Model {
|
||||
override fun deserialize(decoder: Decoder): OathType =
|
||||
when (decoder.decodeByte()) {
|
||||
OathType.HOTP.value -> OathType.HOTP
|
||||
else -> OathType.TOTP
|
||||
OathType.TOTP.value -> OathType.TOTP
|
||||
else -> throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
override val descriptor: SerialDescriptor =
|
||||
|
Loading…
Reference in New Issue
Block a user