commit 3abbcaeae1b1c085d308f0558ce28b86535d6588
parent da14a8d444355f992d4459534769245e2940a118
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date: Tue, 7 Apr 2020 20:48:11 +0200
debug password-less registrations
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
@@ -1133,13 +1133,14 @@ fun main() {
}
post("/ebics/{id}/subscribers") {
+ val newUserId = call.parameters["id"]
val body = call.receive<EbicsSubscriberInfoRequestJson>()
val pairA = CryptoUtil.generateRsaKeyPair(2048)
val pairB = CryptoUtil.generateRsaKeyPair(2048)
val pairC = CryptoUtil.generateRsaKeyPair(2048)
val row = try {
transaction {
- EbicsSubscriberEntity.new(id = expectId(call.parameters["id"])) {
+ EbicsSubscriberEntity.new(id = expectId(newUserId)) {
ebicsURL = body.ebicsURL
hostID = body.hostID
partnerID = body.partnerID
@@ -1150,7 +1151,10 @@ fun main() {
authenticationPrivateKey = SerialBlob(pairC.private.encoded)
password = if (body.password != null) {
SerialBlob(CryptoUtil.hashStringSHA256(body.password))
- } else null
+ } else {
+ logger.debug("No password set for $newUserId")
+ null
+ }
}
}
} catch (e: Exception) {