From 2e337eff0ad75c828001ab5c478862c5145c1015 Mon Sep 17 00:00:00 2001 From: Mahesh Maney R <mahesh-maney@users.noreply.github.com> Date: Mon, 4 Sep 2023 17:59:39 +0530 Subject: [PATCH] adding email instaed of username to save user info <ManeyMR>. --- .../upsmf/userManagement/utility/KeycloakUserUpdater.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/tarento/upsmf/userManagement/utility/KeycloakUserUpdater.java b/src/main/java/com/tarento/upsmf/userManagement/utility/KeycloakUserUpdater.java index fbbca13..a8fad0d 100644 --- a/src/main/java/com/tarento/upsmf/userManagement/utility/KeycloakUserUpdater.java +++ b/src/main/java/com/tarento/upsmf/userManagement/utility/KeycloakUserUpdater.java @@ -73,8 +73,9 @@ public class KeycloakUserUpdater { ArrayNode credentials = (ArrayNode)requestBody.get("credentials"); logger.info("credentials[] {}", credentials); if(!credentials.isEmpty() && !(credentials.get(0).get("value").asText().isBlank())) { - logger.info("userName : {}, credentials.get(0).get(\"value\").asText() : {}",userName, credentials.get(0).get("value").asText()); - String value = keycloakUserCredentialPersister.persistUserInfo(userName, credentials.get(0).get("value").asText()); + String email = requestBody.get("email").asText(); + logger.info("email : {}, credentials.get(0).get(\"value\").asText() : {}",email, credentials.get(0).get("value").asText()); + String value = keycloakUserCredentialPersister.persistUserInfo(email, credentials.get(0).get("value").asText()); logger.info("persistUserInfo response {}", value); } } -- GitLab