Skip to content
Snippets Groups Projects
Commit 4c496398 authored by OZGCloud's avatar OZGCloud
Browse files

find exception, more logging

parent df7f4b4e
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,10 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import lombok.extern.java.Log;
@Component
@Log
class KeycloakUserService {
@Autowired
......@@ -45,9 +48,13 @@ class KeycloakUserService {
if (userHasNoPassword(userSpec, namespace)) {
var secret = userSecretService.getOrCreateClusterSecret(userSpec, namespace);
log.info("Setting generated password " + userSecretService.getPasswordFromSecret(secret) + " for user "
+ userSpec.getKeycloakUser().getUsername());
userSpec.getKeycloakUser().setPassword(userSecretService.getPasswordFromSecret(secret));
}
log.info("Userpw2 " + userSpec.getKeycloakUser().getPassword());
remoteService.getUserByName(userSpec.getKeycloakUser().getUsername(), namespace)
.ifPresentOrElse(existingUser -> remoteService.updateUser(userMapper.update(existingUser, userSpec), namespace),
() -> remoteService.createUser(userMapper.map(userSpec), namespace));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment