libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit ff608aa052b12380acc771479dbedc2f6d512923
parent 3a7e1ec44f643ffd91a23edd925ccb2bdf248e31
Author: MS <ms@taler.net>
Date:   Thu,  8 Dec 2022 11:11:00 +0100

helper

Diffstat:
Msandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 9++-------
Mutil/src/main/kotlin/Ebics.kt | 5+++++
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt @@ -895,13 +895,8 @@ private suspend fun ApplicationCall.handleEbicsIni(header: EbicsUnsecuredRequest val ebicsSubscriber = findEbicsSubscriber(header.static.partnerID, header.static.userID, header.static.systemID) if (ebicsSubscriber == null) { - logger.warn( - "ebics subscriber, userID: ${header.static.userID}" + - ", partnerID: ${header.static.partnerID}" + - ", systemID: ${header.static.systemID}," + - "not found" - ) - throw EbicsUserUnknown(header.static.userID) + logger.warn("ebics subscriber, ${dumpEbicsSubscriber(header.static)}, not found") + throw EbicsUserUnknown(dumpEbicsSubscriber(header.static)) } when (ebicsSubscriber.state) { SubscriberState.NEW -> {} diff --git a/util/src/main/kotlin/Ebics.kt b/util/src/main/kotlin/Ebics.kt @@ -630,4 +630,9 @@ fun makeEbicsHpbRequest(subscriberDetails: EbicsClientSubscriberDetails): String val doc = XMLUtil.convertJaxbToDocument(hpbRequest) XMLUtil.signEbicsDocument(doc, subscriberDetails.customerAuthPriv) return XMLUtil.convertDomToString(doc) +} + +fun dumpEbicsSubscriber(ebicsHeader: EbicsUnsecuredRequest.StaticHeaderType): String { + return "userID: ${ebicsHeader.userID}, partnerID: ${ebicsHeader.partnerID}, systemID: ${ebicsHeader.systemID}" + } \ No newline at end of file