List<String> requiredClaims) throws Exception {
UserStoreManager userStore = null;
Map<String, String> claimValues = null;
OpenIDClaimDTO[] claims = null;
OpenIDClaimDTO dto = null;
IdentityClaimManager claimManager = null;
Claim[] claimData = null;
String[] claimArray = new String[requiredClaims.size()];
String userName = null;
String domainName = null;
String tenatUser = null;
userName = OpenIDUtil.getUserName(openId);
domainName = TenantUtils.getDomainNameFromOpenId(openId);
tenatUser = userName;
if (userName.contains("@")) {
tenatUser = userName.substring(0, userName.indexOf("@"));
}
userStore = IdentityTenantUtil.getRealm(domainName, userName).getUserStoreManager();
claimValues = userStore.getUserClaimValues(tenatUser, requiredClaims.toArray(claimArray),
profileId);
claims = new OpenIDClaimDTO[claimValues.size()];
int i = 0;
claimManager = IdentityClaimManager.getInstance();
claimData = claimManager.getAllSupportedClaims(IdentityConstants.OPENID_SREG_DIALECT,
IdentityTenantUtil.getRealm(domainName, userName));
for (int j = 0; j < claimData.length; j++) {
if (claimValues.containsKey(claimData[j].getClaimUri())) {
dto = new OpenIDClaimDTO();