Added tanExpirationTime to TanChallenge
This commit is contained in:
parent
0848586894
commit
c4f504dd0a
|
@ -388,7 +388,7 @@ open class FinTsJobExecutor(
|
|||
delay(500)
|
||||
|
||||
// most TANs a valid 5 - 15 minutes. So terminate wait process after that time
|
||||
if (Instant.nowExt() > tanChallenge.timestamp.plusMinutes(15)) {
|
||||
if (Instant.nowExt() > tanChallenge.challengeCreationTimestamp.plusMinutes(15)) {
|
||||
if (tanChallenge.isEnteringTanDone == false) {
|
||||
tanChallenge.userDidNotEnterTan()
|
||||
}
|
||||
|
@ -412,13 +412,13 @@ open class FinTsJobExecutor(
|
|||
TanMethodType.ChipTanFlickercode ->
|
||||
FlickerCodeTanChallenge(
|
||||
FlickerCodeDecoder().decodeChallenge(challenge, tanMethod.hhdVersion ?: HHDVersion.HHD_1_4), // HHD 1.4 is currently the most used version
|
||||
forAction, messageToShowToUser, challenge, tanMethod, tanResponse.tanMediaIdentifier, bank, account)
|
||||
forAction, messageToShowToUser, challenge, tanMethod, tanResponse.tanMediaIdentifier, bank, account, tanResponse.tanExpirationTime)
|
||||
|
||||
TanMethodType.ChipTanQrCode, TanMethodType.ChipTanPhotoTanMatrixCode,
|
||||
TanMethodType.QrCode, TanMethodType.photoTan ->
|
||||
ImageTanChallenge(TanImageDecoder().decodeChallenge(challenge), forAction, messageToShowToUser, challenge, tanMethod, tanResponse.tanMediaIdentifier, bank, account)
|
||||
ImageTanChallenge(TanImageDecoder().decodeChallenge(challenge), forAction, messageToShowToUser, challenge, tanMethod, tanResponse.tanMediaIdentifier, bank, account, tanResponse.tanExpirationTime)
|
||||
|
||||
else -> TanChallenge(forAction, messageToShowToUser, challenge, tanMethod, tanResponse.tanMediaIdentifier, bank, account)
|
||||
else -> TanChallenge(forAction, messageToShowToUser, challenge, tanMethod, tanResponse.tanMediaIdentifier, bank, account, tanResponse.tanExpirationTime)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package net.codinux.banking.fints.model
|
||||
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import net.codinux.banking.fints.tan.FlickerCode
|
||||
|
||||
|
||||
|
@ -11,8 +12,9 @@ open class FlickerCodeTanChallenge(
|
|||
tanMethod: TanMethod,
|
||||
tanMediaIdentifier: String?,
|
||||
bank: BankData,
|
||||
account: AccountData? = null
|
||||
) : TanChallenge(forAction, messageToShowToUser, challenge, tanMethod, tanMediaIdentifier, bank, account) {
|
||||
account: AccountData? = null,
|
||||
tanExpirationTime: LocalDateTime? = null
|
||||
) : TanChallenge(forAction, messageToShowToUser, challenge, tanMethod, tanMediaIdentifier, bank, account, tanExpirationTime) {
|
||||
|
||||
override fun toString(): String {
|
||||
return "$tanMethod (medium: $tanMediaIdentifier) $flickerCode: $messageToShowToUser"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package net.codinux.banking.fints.model
|
||||
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import net.codinux.banking.fints.tan.TanImage
|
||||
|
||||
|
||||
|
@ -11,8 +12,9 @@ open class ImageTanChallenge(
|
|||
tanMethod: TanMethod,
|
||||
tanMediaIdentifier: String?,
|
||||
bank: BankData,
|
||||
account: AccountData? = null
|
||||
) : TanChallenge(forAction, messageToShowToUser, challenge, tanMethod, tanMediaIdentifier, bank, account) {
|
||||
account: AccountData? = null,
|
||||
tanExpirationTime: LocalDateTime? = null
|
||||
) : TanChallenge(forAction, messageToShowToUser, challenge, tanMethod, tanMediaIdentifier, bank, account, tanExpirationTime) {
|
||||
|
||||
override fun toString(): String {
|
||||
return "$tanMethod (medium: $tanMediaIdentifier) $image: $messageToShowToUser"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.codinux.banking.fints.model
|
||||
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import net.codinux.banking.fints.extensions.nowExt
|
||||
import net.codinux.banking.fints.messages.datenelemente.implementierte.tan.TanMedium
|
||||
import net.codinux.banking.fints.response.BankResponse
|
||||
|
@ -15,6 +16,12 @@ open class TanChallenge(
|
|||
val tanMediaIdentifier: String?,
|
||||
val bank: BankData,
|
||||
val account: AccountData? = null,
|
||||
/**
|
||||
* Datum und Uhrzeit, bis zu welchem Zeitpunkt eine TAN auf Basis der gesendeten Challenge gültig ist. Nach Ablauf der Gültigkeitsdauer wird die entsprechende TAN entwertet.
|
||||
*
|
||||
* In server's time zone, that is Europe/Berlin.
|
||||
*/
|
||||
val tanExpirationTime: LocalDateTime? = null,
|
||||
val challengeCreationTimestamp: Instant = Instant.nowExt()
|
||||
) {
|
||||
|
||||
|
|
|
@ -31,7 +31,13 @@ open class TanResponse(
|
|||
val challenge: String?, // M: bei TAN-Prozess=1, 3, 4. O: bei TAN-Prozess=2
|
||||
|
||||
val challengeHHD_UC: String?,
|
||||
val validityDateTimeForChallenge: LocalDateTime?,
|
||||
|
||||
/**
|
||||
* Datum und Uhrzeit, bis zu welchem Zeitpunkt eine TAN auf Basis der gesendeten Challenge gültig ist. Nach Ablauf der Gültigkeitsdauer wird die entsprechende TAN entwertet.
|
||||
*
|
||||
* In server's time zone, that is Europe/Berlin.
|
||||
*/
|
||||
val tanExpirationTime: LocalDateTime?,
|
||||
val tanMediaIdentifier: String? = null, // M: bei TAN-Prozess=1, 3, 4 und „Anzahl unterstützter aktiver TAN-Medien“ nicht vorhanden. O: sonst
|
||||
|
||||
segmentString: String
|
||||
|
|
Loading…
Reference in New Issue