Skip to content

Commit

Permalink
Use profileName instead "default" or null
Browse files Browse the repository at this point in the history
  • Loading branch information
rksk authored Aug 4, 2018
1 parent 9946fd6 commit 0ffec51
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ public boolean doPostSetUserClaimValues(String userName, Map<String, String> cla
log.info("Username: " + userName);
log.info("Profile: " + profileName);

log.info("NAME: " + userStoreManager.getUserClaimValue(userName, "http://wso2.org/claims/fullname", "default"));
log.info("EMAIL: " + userStoreManager.getUserClaimValue(userName, "http://wso2.org/claims/emailaddress", "default"));
log.info("NAME: " + userStoreManager.getUserClaimValue(userName, "http://wso2.org/claims/fullname", profileName));
log.info("EMAIL: " + userStoreManager.getUserClaimValue(userName, "http://wso2.org/claims/emailaddress", profileName));


// This doens't work for identity claims
// log.info("LOCKED: " + userStoreManager.getUserClaimValue(userName, "http://wso2.org/claims/identity/accountLocked", "default"));
// log.info("LOCKED: " + userStoreManager.getUserClaimValue(userName, "http://wso2.org/claims/identity/accountLocked", profileName));

// Following is the workaround for above problem

Expand All @@ -83,7 +83,7 @@ public boolean doPostSetUserClaimValues(String userName, Map<String, String> cla
"http://wso2.org/claims/identity/emailVerified"
};

Map<String, String> claimValues = userStoreManager.getUserClaimValues(userName, claimNames, null);
Map<String, String> claimValues = userStoreManager.getUserClaimValues(userName, claimNames, profileName);

log.info("LOCKED: " + claimValues.get(claimNames[0]));
log.info("EmailVerified: " + claimValues.get(claimNames[1]));
Expand Down

0 comments on commit 0ffec51

Please sign in to comment.