Skip to content

Commit

Permalink
modify method to increase the readability
Browse files Browse the repository at this point in the history
  • Loading branch information
lashinijay committed Nov 1, 2024
1 parent c371948 commit 59edad6
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,14 @@ tobeDeleted claims (claims came from federated idp as null). If there is a match

protected char[] resolvePassword(Map<String, String> userClaims) {

char[] passwordFromUser = (userClaims.get(FrameworkConstants.PASSWORD) != null)
? userClaims.get(FrameworkConstants.PASSWORD).toCharArray() : null;
return (passwordFromUser != null && passwordFromUser.length > 0) ?
passwordFromUser : generatePassword();
char[] passwordFromUser = null;
if (userClaims.get(FrameworkConstants.PASSWORD) != null) {
passwordFromUser = userClaims.get(FrameworkConstants.PASSWORD).toCharArray();
}
if (passwordFromUser == null || passwordFromUser.length == 0) {
return generatePassword();
}
return passwordFromUser;
}

private void handleV1Roles(String username, UserStoreManager userStoreManager, UserRealm realm,
Expand Down

0 comments on commit 59edad6

Please sign in to comment.