Another example of the military use of a shiboleth cited by Mark Liberman took place 700 years ago in what is now Belgium. On July 11, 1302 the resistance of the people of Flanders to the attempted annexation of their country by the King of France, known as the Flanders War of Liberation, came to a head in the Battle of the Golden Spurs, fought outside the city of Courtrai. The anniversary of this victory is now the national day of the Flemish community. The battle is of significance in military history as the first recorded occasion on which an army of footsoldiers defeated professional cavalry. At this time, those suspected of being Walloons or Frenchmen who could speak Dutch were asked to say schild en vriend "shield and friend", an expression regarded as particularly difficult for those who were not native speakers. Those who did not pronounce it correctly were determined to be the enemy and killed.
[Update 2004/03/01: Alex Baumans writes from Flanders that this story, which I learned from my Belgian father, is a myth. There probably was some sort of password like this, but it couldn't have been schild en vriend. One reason is that schild didn't acquire the fricative [x] that makes it difficult for non-natives to say until much later and indeed still hasn't in some Flemish dialects. Another is that the enemy consisted not only of the French but of native speakers of Flemish who supported the French crown.]