Upvote:6
"Race" and "racism" are modern inventions. I have never seen any ancient or medieval writer identifying anybody by race. Actually we can only conjecture to which race some of their personages belonged.
The common identifications were by place of birth, religion, social class. And gender, of course (I am not sure what you mean by "sexual identity").
Nationality (and nation-states) is also a later invention. People were either subjects of some sovereign (and could change the sovereign during their life, voluntary or involuntary) or citizens of a republic. Republics were rare.
Upvote:7
I will address race in the west European middle ages, since identity is just too broad to be answered.
First of all it is very important to put yourself in the position of a medieval villein, which is what most people were. They usually did not leave the village where they were born. They would know their immediate family, some of the seigneur's officials, and the local priest, whose economic situation was likely to be similar to their own. They would not meet any foreigners, unless their overlords happened to be foreigners (such as the Normans in England, for example.)
The educated classes of people were a little different. Their main preocuppation would be alliegance to a dynasty as identity. This overlapped with national identity, but was far from contiguous with it. The other Europeans they compared themselves with were, of course, also light-skinned, light-haired, light-eyed.
As far as darker-skinned people were concerned, they did not constantly intrude on European thoughts. Educated Europeans were influenced by the old Roman conception of race, which was that Romans were civilised, mediterranean people were civilised, and people from central Asia, sub-saharan Africa, or northern Europe were barbarians. Note that 'barbarians' weren't defined by skin colour.
Medieval scholars and governments viewed themselves as to some extent the heirs to Roman civilisation. The idea of Roman civilisation became fused somewhat with christianity, since the end of the Roman empire was christian, and the papacy in Rome was (and is still) a holdover from the Roman empire. Before they were brutally subjected to Christian rule, light-skinned people in scandinavia, the Baltics and northern Russia were considered barbarians. They became 'civilized' races after that. Note also that 'Christian' meant a Roman Catholic. Eastern Orthodox Christians were often treated just as badly by Catholic conquerers as Muslim or Jewish subjects had been.
The ancestor of modern racism is the European global empires of a much later date. Black people were slaves, Indians etc were virtual slaves, Chinese people were under the thumb of colonial powers, etc. These ideas wouldn't make any sense to the medieval European.