Added case insensitive detection of appTAN and mobileTAN; added detection for 'mTAN' as mobileTAN; logging if a ZkaTanProcedure couldn't get mapped; not trying to map empty values
This commit is contained in:
parent
1105dfbed0
commit
db129863e6
|
@ -379,9 +379,28 @@ open class ResponseParser @JvmOverloads constructor(
|
|||
}
|
||||
|
||||
protected open fun tryToParseZkaTanProcedure(mayZkaTanProcedure: String): ZkaTanProcedure? {
|
||||
if (mayZkaTanProcedure.isBlank()) {
|
||||
return null
|
||||
}
|
||||
|
||||
try {
|
||||
val lowerCaseMayZkaTanProcedure = mayZkaTanProcedure.toLowerCase()
|
||||
|
||||
if (lowerCaseMayZkaTanProcedure == "mobiletan" || lowerCaseMayZkaTanProcedure == "mtan") {
|
||||
return ZkaTanProcedure.mobileTAN
|
||||
}
|
||||
|
||||
if (lowerCaseMayZkaTanProcedure == "apptan") {
|
||||
return ZkaTanProcedure.appTAN
|
||||
}
|
||||
|
||||
// TODO: what about these values, all returned by banks in anonymous dialog initialization:
|
||||
// BestSign, HHDUSB1, Secoder_UC, ZkaTANMode, photoTAN, QRTAN, 1822TAN+
|
||||
|
||||
return ZkaTanProcedure.valueOf(mayZkaTanProcedure)
|
||||
} catch (ignored: Exception) { }
|
||||
} catch (e: Exception) {
|
||||
log.warn("'$mayZkaTanProcedure' could not be mapped to ZkaTanProcedure")
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue