* @throws MessageException
*/
private void receiveAttributeExchange(HttpServletRequest httpReq,
AuthSuccess authSuccess) throws MessageException {
if (authSuccess.hasExtension(AxMessage.OPENID_NS_AX)) {
FetchResponse fetchResp = (FetchResponse) authSuccess
.getExtension(AxMessage.OPENID_NS_AX);
// List emails = fetchResp.getAttributeValues("email");
// String email = (String) emails.get(0);
List aliases = fetchResp.getAttributeAliases();
Map attributes = new LinkedHashMap();
for (Iterator iter = aliases.iterator(); iter.hasNext();) {
String alias = (String) iter.next();
List values = fetchResp.getAttributeValues(alias);
if (values.size() > 0) {
String[] arr = new String[values.size()];
values.toArray(arr);
attributes.put(alias, StringUtils.join(arr));
}