gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: Specify CAPTCHA page.


From: gnunet
Subject: [libeufin] branch master updated: Specify CAPTCHA page.
Date: Sat, 10 Sep 2022 07:45:37 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 41862b56 Specify CAPTCHA page.
41862b56 is described below

commit 41862b566fab33a9702edfbff873769d801c6e03
Author: MS <ms@taler.net>
AuthorDate: Sat Sep 10 07:44:56 2022 +0200

    Specify CAPTCHA page.
---
 .../src/main/kotlin/tech/libeufin/sandbox/JSON.kt  |  3 ++-
 .../src/main/kotlin/tech/libeufin/sandbox/Main.kt  | 23 +++++++---------------
 2 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt
index 724755af..8e749416 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt
@@ -124,7 +124,8 @@ data class TalerWithdrawalStatus(
     val wire_types: List<String> = listOf("iban"),
     val suggested_exchange: String? = null,
     val sender_wire: String? = null,
-    val aborted: Boolean
+    val aborted: Boolean,
+    val confirm_transfer_url: String
 )
 
 data class TalerWithdrawalSelection(
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index 498e7512..9f67e193 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -41,7 +41,6 @@ import com.fasterxml.jackson.core.JsonParseException
 import com.fasterxml.jackson.core.util.DefaultIndenter
 import com.fasterxml.jackson.core.util.DefaultPrettyPrinter
 import com.fasterxml.jackson.databind.ObjectMapper
-import com.fasterxml.jackson.databind.SerializationConfig
 import com.fasterxml.jackson.databind.SerializationFeature
 import com.fasterxml.jackson.databind.exc.MismatchedInputException
 import com.fasterxml.jackson.module.kotlin.KotlinModule
@@ -58,7 +57,6 @@ import io.ktor.application.*
 import io.ktor.features.*
 import io.ktor.http.*
 import io.ktor.jackson.*
-import io.ktor.network.sockets.*
 import io.ktor.request.*
 import io.ktor.response.*
 import io.ktor.routing.*
@@ -66,21 +64,10 @@ import io.ktor.server.engine.*
 import io.ktor.server.netty.*
 import io.ktor.util.*
 import io.ktor.util.date.*
-import io.netty.channel.DefaultEventLoop
-import io.netty.channel.DefaultEventLoopGroup
-import io.netty.channel.SingleThreadEventLoop
-import io.netty.channel.epoll.EpollEventLoopGroup
-import io.netty.channel.nio.NioEventLoop
-import io.netty.channel.nio.NioEventLoopGroup
-import io.netty.util.concurrent.AbstractEventExecutor
-import io.netty.util.concurrent.DefaultEventExecutor
-import io.netty.util.concurrent.GlobalEventExecutor
-import io.netty.util.concurrent.SingleThreadEventExecutor
 import kotlinx.coroutines.*
 import org.jetbrains.exposed.sql.*
 import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
 import org.jetbrains.exposed.sql.statements.api.ExposedBlob
-import 
org.jetbrains.exposed.sql.transactions.experimental.newSuspendedTransaction
 import org.jetbrains.exposed.sql.transactions.transaction
 import org.slf4j.Logger
 import org.slf4j.LoggerFactory
@@ -93,9 +80,7 @@ import java.math.BigDecimal
 import java.net.BindException
 import java.net.URL
 import java.security.interfaces.RSAPublicKey
-import java.util.concurrent.Executors
 import javax.xml.bind.JAXBContext
-import kotlin.coroutines.CoroutineContext
 import kotlin.system.exitProcess
 
 val logger: Logger = LoggerFactory.getLogger("tech.libeufin.sandbox")
@@ -1190,12 +1175,18 @@ val sandboxApp: Application.() -> Unit = {
                         )
                     }
                     val demobank = ensureDemobank(call)
+                    var captcha_page = call.request.getBaseUrl()
+                    if (!captcha_page.endsWith("/")) {
+                        captcha_page += "/"
+                    }
+                    captcha_page += "demobanks/${demobank.name}"
                     val ret = TalerWithdrawalStatus(
                         selection_done = wo.selectionDone,
                         transfer_done = wo.confirmationDone,
                         amount = "${demobank.currency}:${wo.amount}",
                         suggested_exchange = demobank.suggestedExchangeBaseUrl,
-                        aborted = wo.aborted
+                        aborted = wo.aborted,
+                        confirm_transfer_url = captcha_page
                     )
                     call.respond(ret)
                     return@get

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]