mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-23 18:22:39 +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 =
|
override fun deserialize(decoder: Decoder): OathType =
|
||||||
when (decoder.decodeByte()) {
|
when (decoder.decodeByte()) {
|
||||||
OathType.HOTP.value -> OathType.HOTP
|
OathType.HOTP.value -> OathType.HOTP
|
||||||
else -> OathType.TOTP
|
OathType.TOTP.value -> OathType.TOTP
|
||||||
|
else -> throw IllegalArgumentException()
|
||||||
}
|
}
|
||||||
|
|
||||||
override val descriptor: SerialDescriptor =
|
override val descriptor: SerialDescriptor =
|
||||||
|
Loading…
Reference in New Issue
Block a user