gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: fix attributes setting/getting


From: gnunet
Subject: [libeufin] branch master updated: fix attributes setting/getting
Date: Thu, 30 Jul 2020 16:26:10 +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 79d30b9  fix attributes setting/getting
79d30b9 is described below

commit 79d30b9873cd5db3693b61eaa39f5530aff4704f
Author: MS <ms@taler.net>
AuthorDate: Thu Jul 30 16:26:06 2020 +0200

    fix attributes setting/getting
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 4 +++-
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt                 | 3 +--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
index 3e785bd..79cc631 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -61,6 +61,8 @@ import java.util.*
 import java.util.zip.DeflaterInputStream
 import java.util.zip.InflaterInputStream
 
+val EbicsHostIdAttribute = AttributeKey<String>("RequestedEbicsHostID")
+
 data class PainParseResult(
     val creditorIban: String,
     val creditorName: String,
@@ -790,7 +792,7 @@ private suspend fun ApplicationCall.receiveEbicsXml(): 
Document {
     }
     val requestedHostID = requestDocument.getElementsByTagName("HostID")
     this.attributes.put(
-        AttributeKey<String>("RequestedEbicsHostID"),
+        EbicsHostIdAttribute,
         requestedHostID.item(0).textContent
     )
     return requestDocument
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index 5de9446..b17d66d 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -193,8 +193,7 @@ fun serverMain(dbName: String) {
 
                 val hostAuthPriv = transaction {
                     val host = EbicsHostEntity.find {
-                        EbicsHostsTable.hostID.upperCase() eq
-                                
call.attributes.get<String>(AttributeKey("EbicsHostID")).toUpperCase()
+                        EbicsHostsTable.hostID.upperCase() eq 
call.attributes.get(EbicsHostIdAttribute).toUpperCase()
                     }.firstOrNull() ?: throw SandboxError(
                         HttpStatusCode.InternalServerError,
                         "Requested Ebics host ID not found."

-- 
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]