userId = getUserIdentifier();
try {
connector = IdentityTenantUtil.getRealm(null, userId).getUserStoreManager();
} catch (Exception e) {
throw new IdentityProviderException(e.getMessage(), e);
}
// Get the column names for the URIs
iterator = requestedClaims.values().iterator();
list = new ArrayList<String>();
// First we need to figure-out which attributed we need to retrieve from
// the user store.
while (iterator.hasNext()) {
requestedClaimData = (OpenIDRequestedClaimData) iterator.next();
if (requestedClaimData != null
&& !requestedClaimData.getUri().equals(IdentityConstants.CLAIM_PPID)
&& !requestedClaimData.getUri().equals(IdentityConstants.CLAIM_OPENID)) {
list.add(requestedClaimData.getUri());
}
}
String[] claimValues = new String[list.size()];
// Get the claims values corresponding to the user from the user store.
try {
mapValues = connector.getUserClaimValues(userId, list.toArray(claimValues), null);
} catch (Exception e) {
throw new IdentityProviderException(e.getMessage(), e);
}
iterator = requestedClaims.values().iterator();
// Iterate through the claim values retrieved and requestedClaims will
// be populated with the corresponding values.