*/
public void setSessionAttributes(List<ClaimDTO> claimList) throws IdentityException {
List aliases = null;
List values = null;
FetchResponse fetchReponse = null;
Map attributeTypes = null;
ClaimDTO claim = null;
try {
if (authSuccess.hasExtension(FetchResponse.OPENID_NS_AX)) {
fetchReponse = (FetchResponse) authSuccess.getExtension(FetchResponse.OPENID_NS_AX);
aliases = fetchReponse.getAttributeAliases();
attributeTypes = fetchReponse.getAttributeTypes();
for (Object alias : aliases) {
values = fetchReponse.getAttributeValues((String) alias);
if (values != null && !values.isEmpty()) {
claim = new ClaimDTO();
claim.setClaimUri((String) attributeTypes.get(alias));
claim.setClaimValue((String) values.get(0));
claimList.add(claim);
}
}
} else if (authSuccess.hasExtension(IdentityConstants.OpenId.ExchangeAttributes.NS_AX)) {
fetchReponse = (FetchResponse) authSuccess
.getExtension(IdentityConstants.OpenId.ExchangeAttributes.NS_AX);
aliases = fetchReponse.getAttributeAliases();
attributeTypes = fetchReponse.getAttributeTypes();
for (Object alias : aliases) {
values = fetchReponse.getAttributeValues((String) alias);
if (values != null && !values.isEmpty()) {
claim = new ClaimDTO();
claim.setClaimUri((String) attributeTypes.get(alias));
claim.setClaimValue((String) values.get(0));
claimList.add(claim);