/** Adding the user identity data to the claims set */ @Override public boolean doPostGetUserClaimValues( String userName, String[] claims, String profileName, Map<String, String> claimMap, UserStoreManager storeManager) throws UserStoreException { IdentityMgtConfig config = IdentityMgtConfig.getInstance(); if (!config.isListenerEnable()) { return true; } if (claimMap == null) { claimMap = new HashMap<String, String>(); } UserIdentityDataStore identityDataStore = IdentityMgtConfig.getInstance().getIdentityDataStore(); // check if there are identity claims boolean containsIdentityClaims = false; for (String claim : claims) { if (claim.contains(UserCoreConstants.ClaimTypeURIs.CHALLENGE_QUESTION_URI) || claim.contains(UserCoreConstants.ClaimTypeURIs.IDENTITY_CLAIM_URI)) { containsIdentityClaims = true; break; } } // if there are no identity claims, let it go if (!containsIdentityClaims) { return true; } // there is/are identity claim/s . load the dto UserIdentityClaimsDO identityDTO = identityDataStore.load(userName, storeManager); // if no user identity data found, just continue if (identityDTO == null) { return true; } // data found, add the values for security questions and identity claims for (String claim : claims) { if (identityDTO.getUserDataMap().containsKey(claim)) { claimMap.put(claim, identityDTO.getUserDataMap().get(claim)); } } return true; }