private void handleAttributeRequests(FetchRequest fetchRequest, List<OpenIdRequestedAttribute> requestedAttributes, boolean required) {
@SuppressWarnings("unchecked")
Map<String, String> attributes = fetchRequest.getAttributes(required);
for (Map.Entry<String, String> entry : attributes.entrySet()) {
OpenIdRequestedAttributeImpl requestedAttribute = new OpenIdRequestedAttributeImpl();
requestedAttribute.setAlias(entry.getKey());
requestedAttribute.setTypeUri(entry.getValue());
requestedAttribute.setRequired(required);
requestedAttribute.setCount(fetchRequest.getCount(entry.getKey()));
requestedAttributes.add(requestedAttribute);
}
}