Passing fints4k's new addTanExpiredCallback on to BankingClient
This commit is contained in:
parent
384ab2fd9e
commit
1f8fecca7c
|
@ -65,7 +65,17 @@ open class TanChallenge(
|
|||
|
||||
|
||||
/**
|
||||
* Principally a no-op method, not implemented for all client, only implementing client for not: FinTs4jBankingClient.
|
||||
* Not implemented for all client, only implementing client for now: FinTs4jBankingClient.
|
||||
*
|
||||
* If a TAN expires either when [TanChallenge.tanExpirationTime] or a default timeout (15 min) is exceeded,
|
||||
* you can add a callback to get notified when TAN expired e.g. to close a EnterTanDialog.
|
||||
*/
|
||||
open fun addTanExpiredCallback(callback: () -> Unit) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Principally a no-op method, not implemented for all client, only implementing client for now: FinTs4jBankingClient.
|
||||
*
|
||||
* If a TAN is requested for a decoupled TAN method like [TanMethodType.DecoupledTan] or [TanMethodType.DecoupledPushTan],
|
||||
* you can add a callback to get notified when user approved TAN in her app e.g. to close a EnterTanDialog.
|
||||
|
|
|
@ -216,6 +216,10 @@ open class FinTs4kMapper {
|
|||
val flickerCode = if (challenge is FlickerCodeTanChallenge) mapFlickerCode(challenge.flickerCode) else null
|
||||
|
||||
return object : TanChallenge(type, action, challenge.messageToShowToUser, selectedTanMethodId, tanMethods, selectedTanMediumName, tanMedia, tanImage, flickerCode, user, account, challenge.tanExpirationTime, challenge.challengeCreationTimestamp) {
|
||||
override fun addTanExpiredCallback(callback: () -> Unit) {
|
||||
challenge.addTanExpiredCallback(callback)
|
||||
}
|
||||
|
||||
override fun addUserApprovedDecoupledTanCallback(callback: () -> Unit) {
|
||||
challenge.addUserApprovedDecoupledTanCallback(callback)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue