[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Comments
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Comments |
Date: |
Mon, 18 May 2020 10:37:28 +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 f3f7d67 Comments
f3f7d67 is described below
commit f3f7d67e99ac9a976b95812ac593828102181580
Author: MS <address@hidden>
AuthorDate: Mon May 18 10:37:24 2020 +0200
Comments
---
.../src/main/kotlin/tech/libeufin/sandbox/Main.kt | 42 +++++++++++++++-------
util/src/test/kotlin/XmlUtilTest.kt | 5 +++
2 files changed, 34 insertions(+), 13 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index b3c0751..ca1893e 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -61,7 +61,10 @@ class UnacceptableFractional(badNumber: BigDecimal) :
Exception(
)
val LOGGER: Logger = LoggerFactory.getLogger("tech.libeufin.sandbox")
-data class SandboxError(val statusCode: HttpStatusCode, val reason: String) :
java.lang.Exception()
+data class SandboxError(
+ val statusCode: HttpStatusCode,
+ val reason: String
+) : java.lang.Exception()
fun findEbicsSubscriber(partnerID: String, userID: String, systemID: String?):
EbicsSubscriberEntity? {
return if (systemID == null) {
@@ -142,9 +145,10 @@ fun main() {
get("/") {
call.respondText("Hello Sandbox!\n", ContentType.Text.Plain)
}
-
- /** EBICS ADMIN ENDPOINTS */
- post("/admin/ebics-subscriber/bank-account") {
+ /**
+ * Associates a new bank account with an existing Ebics subscriber.
+ */
+ post("/admin/ebics/bank-accounts") {
val body = call.receive<BankAccountRequest>()
transaction {
val subscriber = getEbicsSubscriberFromDetails(
@@ -165,8 +169,10 @@ fun main() {
)
return@post
}
-
- post("/admin/ebics-subscriber") {
+ /**
+ * Creates a new Ebics subscriber.
+ */
+ post("/admin/ebics/subscribers") {
val body = call.receive<EbicsSubscriberElement>()
transaction {
EbicsSubscriberEntity.new {
@@ -184,7 +190,10 @@ fun main() {
)
return@post
}
- get("/admin/ebics-subscribers") {
+ /**
+ * Shows a Ebics subscriber's details.
+ */
+ get("/admin/ebics/subscribers") {
var ret = AdminGetSubscribers()
transaction {
EbicsSubscriberEntity.all().forEach {
@@ -200,7 +209,9 @@ fun main() {
call.respond(ret)
return@get
}
- /* Show details about ONE Ebics host */
+ /**
+ * Shows details about ONE Ebics host
+ */
get("/ebics/hosts/{id}") {
val resp = transaction {
val host = EbicsHostEntity.find { EbicsHostsTable.hostID
eq call.parameters["id"]!! }.firstOrNull()
@@ -216,7 +227,9 @@ fun main() {
)
else call.respond(resp)
}
- /** Create a new EBICS host. */
+ /**
+ * Creates a new EBICS host.
+ */
post("/admin/ebics-host") {
val req = call.receive<EbicsHostCreateRequest>()
val pairA = CryptoUtil.generateRsaKeyPair(2048)
@@ -240,15 +253,18 @@ fun main() {
)
return@post
}
- /* Show ONLY names of all the Ebics hosts */
+ /**
+ * Show ONLY names of all the Ebics hosts
+ */
get("/ebics/hosts") {
val ebicsHosts = transaction {
EbicsHostEntity.all().map { it.hostId }
}
call.respond(EbicsHostsResponse(ebicsHosts))
}
-
- /** MAIN EBICS handler. */
+ /**
+ * Serves all the Ebics requests.
+ */
post("/ebicsweb") {
call.ebicsweb()
}
@@ -257,4 +273,4 @@ fun main() {
}
LOGGER.info("Up and running")
server.start(wait = true)
-}
+}
\ No newline at end of file
diff --git a/util/src/test/kotlin/XmlUtilTest.kt
b/util/src/test/kotlin/XmlUtilTest.kt
index 57394b8..80d7f8e 100644
--- a/util/src/test/kotlin/XmlUtilTest.kt
+++ b/util/src/test/kotlin/XmlUtilTest.kt
@@ -176,4 +176,9 @@ class XmlUtilTest {
val key = CryptoUtil.loadRsaPublicKey(keyBytes)
assertTrue(XMLUtil.verifyEbicsDocument(doc, key))
}
+
+ @Test
+ fun marshalling() {
+ XMLUtil.convertJaxbToString(Any())
+ }
}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Comments,
gnunet <=